You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2012/07/11 16:14:40 UTC

svn commit: r1360182 - /openwebbeans/trunk/webbeans-test/cditest-owb/src/main/java/org/apache/webbeans/cditest/owb/CdiTestOpenWebBeansContainer.java

Author: struberg
Date: Wed Jul 11 14:14:39 2012
New Revision: 1360182

URL: http://svn.apache.org/viewvc?rev=1360182&view=rev
Log:
OWB-675 that was a bit too much ServletContextEvent in some cases

Object parameters for the win :/

Modified:
    openwebbeans/trunk/webbeans-test/cditest-owb/src/main/java/org/apache/webbeans/cditest/owb/CdiTestOpenWebBeansContainer.java

Modified: openwebbeans/trunk/webbeans-test/cditest-owb/src/main/java/org/apache/webbeans/cditest/owb/CdiTestOpenWebBeansContainer.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-test/cditest-owb/src/main/java/org/apache/webbeans/cditest/owb/CdiTestOpenWebBeansContainer.java?rev=1360182&r1=1360181&r2=1360182&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-test/cditest-owb/src/main/java/org/apache/webbeans/cditest/owb/CdiTestOpenWebBeansContainer.java (original)
+++ openwebbeans/trunk/webbeans-test/cditest-owb/src/main/java/org/apache/webbeans/cditest/owb/CdiTestOpenWebBeansContainer.java Wed Jul 11 14:14:39 2012
@@ -63,7 +63,7 @@ public class CdiTestOpenWebBeansContaine
     {
         if (lifecycle != null) 
         {
-            lifecycle.stopApplication(servletContext);
+            lifecycle.stopApplication(new ServletContextEvent(servletContext));
         }
     }
 
@@ -72,10 +72,8 @@ public class CdiTestOpenWebBeansContaine
         WebBeansContext webBeansContext = WebBeansContext.getInstance();
         ContextFactory contextFactory = webBeansContext.getContextFactory();
 
-        ServletContextEvent servletContextEvent = new ServletContextEvent(servletContext);
-
-        contextFactory.initSingletonContext(servletContextEvent);
-        contextFactory.initApplicationContext(servletContextEvent);
+        contextFactory.initSingletonContext(servletContext);
+        contextFactory.initApplicationContext(servletContext);
         contextFactory.initSessionContext(session);
         contextFactory.initConversationContext(null);
         contextFactory.initRequestContext(null);
@@ -86,7 +84,7 @@ public class CdiTestOpenWebBeansContaine
         WebBeansContext webBeansContext = WebBeansContext.getInstance();
         ContextFactory contextFactory = webBeansContext.getContextFactory();
 
-        contextFactory.initApplicationContext(new ServletContextEvent(servletContext));
+        contextFactory.initApplicationContext(servletContext);
     }
 
     public void startConversationScope() throws Exception 
@@ -131,7 +129,7 @@ public class CdiTestOpenWebBeansContaine
         Context context = contextFactory.getStandardContext(ContextTypes.SINGLETON);
         if(context != null && context.isActive())
         {
-            contextFactory.destroySingletonContext(new ServletContextEvent(servletContext));
+            contextFactory.destroySingletonContext(servletContext);
         }
         else
         {
@@ -153,7 +151,7 @@ public class CdiTestOpenWebBeansContaine
         Context context = contextFactory.getStandardContext(ContextTypes.APPLICATION);
         if(context != null && context.isActive())
         {
-            contextFactory.destroyApplicationContext(new ServletContextEvent(servletContext));
+            contextFactory.destroyApplicationContext(servletContext);
         }
         else
         {