[jboss-cvs] JBossAS SVN: r78801 - projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Sep 23 22:21:49 EDT 2008
Author: ALRubinger
Date: 2008-09-23 22:21:49 -0400 (Tue, 23 Sep 2008)
New Revision: 78801
Modified:
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java
Log:
[EJBTHREE-1487] Push the ENC before creating new Session, pop after
Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java 2008-09-23 23:51:49 UTC (rev 78800)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java 2008-09-24 02:21:49 UTC (rev 78801)
@@ -1312,10 +1312,22 @@
StatefulSessionContainerMethodInvocation newStatefulInvocation = null;
StatefulBeanContext ctx = null;
- if (initParameterTypes.length > 0)
- ctx = getCache().create(initParameterTypes, initParameterValues);
- else
- ctx = getCache().create(null, null);
+
+ // ENC is required in scope to create a session
+ this.pushEnc();
+
+ try
+ {
+ if (initParameterTypes.length > 0)
+ ctx = getCache().create(initParameterTypes, initParameterValues);
+ else
+ ctx = getCache().create(null, null);
+ }
+ finally
+ {
+ // Pop the ENC off the stack
+ this.popEnc();
+ }
Object newId = ctx.getId();
newStatefulInvocation = new StatefulSessionContainerMethodInvocation(info);
More information about the jboss-cvs-commits
mailing list