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 16:41:17 UTC

svn commit: r1025603 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java

Author: rederpj
Date: Wed Oct 20 14:41:16 2010
New Revision: 1025603

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

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java?rev=1025603&r1=1025602&r2=1025603&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java Wed Oct 20 14:41:16 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]);