making OWB web plugin and conversation service splittable for session creation (one forces creation not the other)
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/bdce294a Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/bdce294a Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/bdce294a Branch: refs/heads/master Commit: bdce294a12c570dec052b5b90afdb2ae3851a1d8 Parents: 6c254f1 Author: Romain Manni-Bucau <rmannibu...@apache.org> Authored: Thu Mar 5 17:08:11 2015 +0100 Committer: Romain Manni-Bucau <rmannibu...@apache.org> Committed: Thu Mar 5 17:08:25 2015 +0100 ---------------------------------------------------------------------- .../java/org/apache/openejb/cdi/CdiAppContextsService.java | 6 +++--- .../src/main/java/org/apache/openejb/cdi/CdiPlugin.java | 2 +- tck/cdi-embedded/src/test/resources/failing.xml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tomee/blob/bdce294a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiAppContextsService.java ---------------------------------------------------------------------- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiAppContextsService.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiAppContextsService.java index 2d0598b..7e616cc 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiAppContextsService.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiAppContextsService.java @@ -142,15 +142,15 @@ public class CdiAppContextsService extends AbstractContextsService implements Co @Override public String getConversationSessionId() { - return currentSessionId(); + return currentSessionId(false); } - public String currentSessionId() { + public String currentSessionId(final boolean force) { final ServletRequestContext rc = requestContext.get(); if (rc != null) { final HttpServletRequest req = rc.getServletRequest(); if (req != null) { - final HttpSession session = req.getSession(false); + final HttpSession session = req.getSession(force); if (session != null) { return session.getId(); } http://git-wip-us.apache.org/repos/asf/tomee/blob/bdce294a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java ---------------------------------------------------------------------- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java index 3c04eee..4344137 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java @@ -113,7 +113,7 @@ public class CdiPlugin extends AbstractOwbPlugin implements OpenWebBeansJavaEEPl @Override public String currentSessionId() { - return CdiAppContextsService.class.cast(webBeansContext.getService(ContextsService.class)).currentSessionId(); + return CdiAppContextsService.class.cast(webBeansContext.getService(ContextsService.class)).currentSessionId(true); } @Override http://git-wip-us.apache.org/repos/asf/tomee/blob/bdce294a/tck/cdi-embedded/src/test/resources/failing.xml ---------------------------------------------------------------------- diff --git a/tck/cdi-embedded/src/test/resources/failing.xml b/tck/cdi-embedded/src/test/resources/failing.xml index 6b86fa7..dd71410 100644 --- a/tck/cdi-embedded/src/test/resources/failing.xml +++ b/tck/cdi-embedded/src/test/resources/failing.xml @@ -31,7 +31,7 @@ -Dopenejb.embedded.try-jsp=true --> <classes> - <class name="org.jboss.cdi.tck.tests.extensions.beanManager.unmanaged.UnmanagedInstanceTest" /> + <class name="org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest" /> </classes> </test> </suite>