You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by re...@apache.org on 2010/10/20 17:32:58 UTC

svn commit: r1025617 - /openwebbeans/branches/owb_1.0.x/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java

Author: rederpj
Date: Wed Oct 20 15:32:57 2010
New Revision: 1025617

URL: http://svn.apache.org/viewvc?rev=1025617&view=rev
Log:
[OWB-476] Call startContext to initialize the local context value to the currently active context.

Modified:
    openwebbeans/branches/owb_1.0.x/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java

Modified: openwebbeans/branches/owb_1.0.x/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java
URL: http://svn.apache.org/viewvc/openwebbeans/branches/owb_1.0.x/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java?rev=1025617&r1=1025616&r2=1025617&view=diff
==============================================================================
--- openwebbeans/branches/owb_1.0.x/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java (original)
+++ openwebbeans/branches/owb_1.0.x/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java Wed Oct 20 15:32:57 2010
@@ -21,6 +21,7 @@ package org.apache.webbeans.lifecycle;
 import java.lang.annotation.Annotation;
 import java.util.Properties;
 
+import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.inject.spi.BeanManager;
 
 import org.apache.webbeans.config.BeansDeployer;
@@ -137,6 +138,9 @@ public abstract class AbstractLifeCycle 
         {
             //Sub-classes operations            
             beforeStopApplication(endObject);
+
+            //Set up the thread local for Application scoped as listeners will be App scoped.
+            this.contextsService.startContext(ApplicationScoped.class, endObject);   
             
             //Fire shut down
             this.beanManager.fireEvent(new BeforeShutdownImpl(), new Annotation[0]);