Author: nickarls
Date: 2010-04-01 04:17:57 -0400 (Thu, 01 Apr 2010)
New Revision: 6073
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java
Log:
Don't create new session when ending request
Modified: core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java 2010-04-01
07:13:36 UTC (rev 6072)
+++ core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java 2010-04-01
08:17:57 UTC (rev 6073)
@@ -26,6 +26,7 @@
import static org.jboss.weld.servlet.BeanProvider.conversationManager;
import static org.jboss.weld.servlet.BeanProvider.httpSessionManager;
+import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
@@ -177,8 +178,8 @@
{
return;
}
-
-
conversationManager(request.getSession().getServletContext()).teardownConversation();
+ HttpPassThruSessionBeanStore sessionBeanStore = (HttpPassThruSessionBeanStore)
lifecycle.getSessionContext().getBeanStore();
+ conversationManager(sessionBeanStore.getServletContext()).teardownConversation();
teardownRequest(request);
lifecycle.getConversationContext().setBeanStore(null);
lifecycle.getConversationContext().setActive(false);