openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r886349 - in /incubator/openwebbeans/trunk/webbeans-impl/src: main/java/org/apache/webbeans/config/ main/java/org/apache/webbeans/lifecycle/ test/java/org/apache/webbeans/newtests/decorators/tests/
Date Thu, 03 Dec 2009 00:47:59 GMT
Author: struberg
Date: Thu Dec  3 00:47:59 2009
New Revision: 886349

URL: http://svn.apache.org/viewvc?rev=886349&view=rev
Log:
OWB-184 add BeanManager as managed bean as soon as possible

The problem which caused almost all TCKs to got skipped was that the BeanManager
got only added with configureDefaultBeans() at the end of the container startup.
If there was a DeploymentException or any similar unexpedted behaviour detected,
the BeanManager never got added as managed bean, thus causing an Exception
while firing the ShutdownEvent.

Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/StandaloneLifeCycle.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/tests/ConversationDecoratorTest.java

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java?rev=886349&r1=886348&r2=886349&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
Thu Dec  3 00:47:59 2009
@@ -128,6 +128,9 @@
                 JNDIService service = ServiceLoader.getService(JNDIService.class);
                 service.bind(WebBeansConstants.WEB_BEANS_MANAGER_JNDI_NAME, BeanManagerImpl.getManager());
 
+                // Register Manager built-in component
+                BeanManagerImpl.getManager().addBean(WebBeansUtil.getManagerBean());
+
                 //Fire Event
                 fireBeforeBeanDiscoveryEvent();
                 
@@ -187,9 +190,6 @@
     
     private void configureDefaultBeans()
     {
-        // Register Manager built-in component
-        BeanManagerImpl.getManager().addBean(WebBeansUtil.getManagerBean());
-
         // Register Conversation built-in component
         BeanManagerImpl.getManager().addBean(WebBeansUtil.getConversationBean());
         

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/StandaloneLifeCycle.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/StandaloneLifeCycle.java?rev=886349&r1=886348&r2=886349&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/StandaloneLifeCycle.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/StandaloneLifeCycle.java
Thu Dec  3 00:47:59 2009
@@ -84,7 +84,6 @@
             }
             
             beanManager.setXMLConfigurator(this.xmlConfig);        
-
         }
     }
 

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/tests/ConversationDecoratorTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/tests/ConversationDecoratorTest.java?rev=886349&r1=886348&r2=886349&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/tests/ConversationDecoratorTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/tests/ConversationDecoratorTest.java
Thu Dec  3 00:47:59 2009
@@ -27,7 +27,6 @@
 import org.apache.webbeans.config.OpenWebBeansConfiguration;
 import org.apache.webbeans.newtests.AbstractUnitTest;
 import org.apache.webbeans.newtests.decorators.common.ConversationDecorator;
-import org.apache.webbeans.spi.ServiceLoader;
 import org.apache.webbeans.spi.conversation.ConversationService;
 import org.junit.Test;
 



Mime
View raw message