Author: nickarls
Date: 2010-04-07 08:03:06 -0400 (Wed, 07 Apr 2010)
New Revision: 6079
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/context/ContextLifecycle.java
core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/ScopeTest.java
Log:
Unbreaking endRequest
Modified: core/trunk/impl/src/main/java/org/jboss/weld/context/ContextLifecycle.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/context/ContextLifecycle.java 2010-04-07
02:40:50 UTC (rev 6078)
+++ core/trunk/impl/src/main/java/org/jboss/weld/context/ContextLifecycle.java 2010-04-07
12:03:06 UTC (rev 6079)
@@ -26,11 +26,11 @@
import static org.jboss.weld.logging.LoggerFactory.loggerFactory;
import static org.jboss.weld.logging.messages.ContextMessage.APPLICATION_ENDED;
import static org.jboss.weld.logging.messages.ContextMessage.APPLICATION_STARTED;
+import static org.jboss.weld.logging.messages.ContextMessage.CONVERSATION_RESTORED;
import static org.jboss.weld.logging.messages.ContextMessage.REQUEST_ENDED;
import static org.jboss.weld.logging.messages.ContextMessage.REQUEST_STARTED;
import static org.jboss.weld.logging.messages.ContextMessage.SESSION_ENDED;
import static org.jboss.weld.logging.messages.ContextMessage.SESSION_RESTORED;
-import static org.jboss.weld.logging.messages.ContextMessage.CONVERSATION_RESTORED;
import org.jboss.weld.bootstrap.api.Lifecycle;
import org.jboss.weld.bootstrap.api.Service;
@@ -196,12 +196,13 @@
private void activateConversationContext()
{
- activateContext(conversationContext, new ConcurrentHashMapBeanStore());
+ activateContext(conversationContext, new HashMapBeanStore());
}
private void activateSessionContext()
{
- activateContext(sessionContext, new ConcurrentHashMapBeanStore());
+// activateContext(sessionContext, new HttpPassThruSessionBeanStore());
+ sessionContext.setActive(true);
}
public void endApplication()
@@ -270,7 +271,6 @@
public void endSession(String id, BeanStore sessionBeanStore)
{
log.trace(SESSION_ENDED, id);
- destroyConversationContext();
destroySessionContext(sessionBeanStore);
}
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-07
02:40:50 UTC (rev 6078)
+++ core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java 2010-04-07
12:03:06 UTC (rev 6079)
@@ -177,9 +177,9 @@
{
return;
}
- teardownRequest(request);
teardownConversation();
teardownSession(request);
+ teardownRequest(request);
}
private void teardownRequest(HttpServletRequest request)
Modified: core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/ScopeTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/ScopeTest.java 2010-04-07
02:40:50 UTC (rev 6078)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/ScopeTest.java 2010-04-07
12:03:06 UTC (rev 6079)
@@ -73,6 +73,7 @@
{
ContextLifecycle lifecycle =
Container.instance().services().get(ContextLifecycle.class);
lifecycle.endRequest("test",
lifecycle.getRequestContext().getBeanStore());
+ lifecycle.restoreSession("test", new HashMapBeanStore());
lifecycle.beginRequest("test", new HashMapBeanStore());
}
Show replies by date