[seam-commits] Seam SVN: r11274 - in branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam: servlet and 1 other directory.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Jul 13 06:33:11 EDT 2009
Author: manaRH
Date: 2009-07-13 06:33:11 -0400 (Mon, 13 Jul 2009)
New Revision: 11274
Modified:
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts/Lifecycle.java
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts/ServletLifecycle.java
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/servlet/SeamListener.java
Log:
back ported JBSEAM-2255
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts/Lifecycle.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts/Lifecycle.java 2009-07-13 10:28:24 UTC (rev 11273)
+++ branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts/Lifecycle.java 2009-07-13 10:33:11 UTC (rev 11274)
@@ -49,9 +49,14 @@
public static void endApplication()
{
+ endApplication(application);
+ }
+
+ public static void endApplication(Map<String,Object> app)
+ {
log.debug("Shutting down application and destroying contexts");
- Context tempApplicationContext = new ApplicationContext( getApplication() );
+ Context tempApplicationContext = new ApplicationContext( app );
Contexts.applicationContext.set(tempApplicationContext);
Contexts.destroy(tempApplicationContext);
Contexts.applicationContext.set(null);
@@ -244,9 +249,13 @@
}
}
-
public static void endSession(Map<String, Object> session)
{
+ endSession(session, application);
+ }
+
+ public static void endSession(Map<String, Object> session, Map<String,Object> app)
+ {
log.debug("End of session, destroying contexts");
//This code assumes that sessions are only destroyed at the very end of a
@@ -258,7 +267,7 @@
throw new IllegalStateException("Please end the HttpSession via org.jboss.seam.web.Session.instance().invalidate()");
}
- Context tempApplicationContext = new ApplicationContext( getApplication() );
+ Context tempApplicationContext = new ApplicationContext( app );
Contexts.applicationContext.set(tempApplicationContext);
//this is used just as a place to stick the ConversationManager
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts/ServletLifecycle.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts/ServletLifecycle.java 2009-07-13 10:28:24 UTC (rev 11273)
+++ branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts/ServletLifecycle.java 2009-07-13 10:33:11 UTC (rev 11274)
@@ -140,7 +140,12 @@
public static void endApplication()
{
- Lifecycle.endApplication();
+ endApplication(servletContext);
+ }
+
+ public static void endApplication(ServletContext context)
+ {
+ Lifecycle.endApplication(new ServletApplicationMap( context));
servletContext=null;
}
@@ -151,7 +156,7 @@
public static void endSession(HttpSession session)
{
- Lifecycle.endSession( new ServletSessionMap(session) );
+ Lifecycle.endSession( new ServletSessionMap(session) , new ServletApplicationMap(session.getServletContext()));
}
public static void resumeConversation(HttpServletRequest request)
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/servlet/SeamListener.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/servlet/SeamListener.java 2009-07-13 10:28:24 UTC (rev 11273)
+++ branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/servlet/SeamListener.java 2009-07-13 10:33:11 UTC (rev 11274)
@@ -38,7 +38,7 @@
public void contextDestroyed(ServletContextEvent event)
{
- ServletLifecycle.endApplication();
+ ServletLifecycle.endApplication(event.getServletContext());
}
public void sessionCreated(HttpSessionEvent event)
More information about the seam-commits
mailing list