openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1083959 - in /openwebbeans/trunk: webbeans-impl/src/main/java/org/apache/webbeans/context/ webbeans-impl/src/main/java/org/apache/webbeans/corespi/se/ webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/ webbeans-impl/src/test/java/o...
Date Mon, 21 Mar 2011 21:13:11 GMT
Author: struberg
Date: Mon Mar 21 21:13:11 2011
New Revision: 1083959

URL: http://svn.apache.org/viewvc?rev=1083959&view=rev
Log:
OWB-461 just a bit code cleanup

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SessionContext.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/se/DefaultContextsService.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/dependent/DependentInterceptorTest.java
    openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SessionContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SessionContext.java?rev=1083959&r1=1083958&r2=1083959&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SessionContext.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SessionContext.java
Mon Mar 21 21:13:11 2011
@@ -68,10 +68,10 @@ public class SessionContext extends Abst
         Contextual<?> contextual = null;
         while(it.hasNext()) 
         {
-            String id = (String)it.next();
+            String id = it.next();
             if (id != null)
             {
-                contextual = (Contextual<?>) webBeansContext.getBeanManagerImpl().getPassivationCapableBean(id);
+                contextual = webBeansContext.getBeanManagerImpl().getPassivationCapableBean(id);
             }
             if (contextual != null) 
             {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/se/DefaultContextsService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/se/DefaultContextsService.java?rev=1083959&r1=1083958&r2=1083959&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/se/DefaultContextsService.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/se/DefaultContextsService.java
Mon Mar 21 21:13:11 2011
@@ -217,7 +217,6 @@ public class DefaultContextsService exte
         conversationContext.remove();
         dependentContext.remove();
         singletonContext.remove();
-        
     }
     
     

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=1083959&r1=1083958&r2=1083959&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
Mon Mar 21 21:13:11 2011
@@ -141,7 +141,7 @@ public abstract class AbstractLifeCycle 
             beforeStopApplication(endObject);
 
             //Set up the thread local for Application scoped as listeners will be App scoped.
-            this.contextsService.startContext(ApplicationScoped.class, endObject);   
+            this.contextsService.startContext(ApplicationScoped.class, endObject);
             
             //Fire shut down
             this.beanManager.fireEvent(new BeforeShutdownImpl(), new Annotation[0]);

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/dependent/DependentInterceptorTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/dependent/DependentInterceptorTest.java?rev=1083959&r1=1083958&r2=1083959&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/dependent/DependentInterceptorTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/dependent/DependentInterceptorTest.java
Mon Mar 21 21:13:11 2011
@@ -73,7 +73,9 @@ public class DependentInterceptorTest ex
         
         DependentScopedBean dbean = (DependentScopedBean)reference;
         dbean.sayHello();
-        //X TODO this should finally work! Assert.assertTrue(DependentInterceptor.refCount
== 1);
+
+        //X TODO this should finally work!
+        //X Assert.assertTrue(DependentInterceptor.refCount == 1);
         
         Assert.assertTrue(DependentScopedBean.SAY_HELLO);
                 

Modified: openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java?rev=1083959&r1=1083958&r2=1083959&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java
Mon Mar 21 21:13:11 2011
@@ -43,6 +43,9 @@ import javax.servlet.http.HttpSessionLis
 /**
  * Initializing the beans container for using in an web application
  * environment.
+ *
+ * This is the main entry point for starting the CDI container
+ * for a servlet.
  * 
  * @version $Rev: 910075 $ $Date: 2010-02-14 23:17:23 +0200 (Sun, 14 Feb 2010) $
  */
@@ -92,6 +95,9 @@ public class WebBeansConfigurationListen
     {
         this.lifeCycle.stopApplication(event);
         this.lifeCycle = null;
+
+        // just to be sure that we didn't lazily create anything...
+        cleanupRequestThreadLocals();
     }
 
     /**
@@ -133,7 +139,7 @@ public class WebBeansConfigurationListen
 
     /**
      * Ensures that all ThreadLocals, which could have been set in this
-     * request's Thread, are removed in order to prevent memory leaks. 
+     * requests Thread, are removed in order to prevent memory leaks.
      */
     private void cleanupRequestThreadLocals()
     {
@@ -158,8 +164,7 @@ public class WebBeansConfigurationListen
             this.lifeCycle.getContextService().startContext(RequestScoped.class, event);
 
             // we don't initialise the Session here but do it lazily if it gets requested
-            // the first time. See OWB-457            
-
+            // the first time. See OWB-457
         }
         catch (Exception e)
         {



Mime
View raw message