[jboss-cvs] JBossAS SVN: r58480 - trunk/ejb3/src/main/org/jboss/ejb3/stateful
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Nov 16 19:46:33 EST 2006
Author: bill.burke at jboss.com
Date: 2006-11-16 19:46:32 -0500 (Thu, 16 Nov 2006)
New Revision: 58480
Modified:
trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulBeanContext.java
trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveInterceptor.java
Log:
In StatefulRemoveInterceptor, do not remove if the ctx has already been discarded or removed.
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulBeanContext.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulBeanContext.java 2006-11-17 00:29:05 UTC (rev 58479)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulBeanContext.java 2006-11-17 00:46:32 UTC (rev 58480)
@@ -233,6 +233,11 @@
this.txSynchronized = txSynchronized;
}
+ public boolean isRemoved()
+ {
+ return removed;
+ }
+
public void remove()
{
if (removed)
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveInterceptor.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveInterceptor.java 2006-11-17 00:29:05 UTC (rev 58479)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveInterceptor.java 2006-11-17 00:46:32 UTC (rev 58480)
@@ -28,6 +28,7 @@
import org.jboss.aop.advice.Interceptor;
import org.jboss.aop.joinpoint.Invocation;
import org.jboss.ejb3.tx.TxUtil;
+import org.jboss.ejb3.BeanContext;
import org.jboss.logging.Logger;
import org.jboss.tm.TxUtils;
@@ -111,7 +112,11 @@
protected void removeSession(Invocation invocation, boolean exceptionThrown) throws Throwable
{
StatefulContainerInvocation ejb = (StatefulContainerInvocation) invocation;
+ StatefulBeanContext ctx = (StatefulBeanContext)ejb.getBeanContext();
+ if (ctx.isDiscarded() || ctx.isRemoved()) return;
Object id = ejb.getId();
+
+
StatefulContainer container = (StatefulContainer) ejb.getAdvisor();
Transaction tx = null;
try
More information about the jboss-cvs-commits
mailing list