[jboss-cvs] JBossAS SVN: r78747 - branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/stateful.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Sep 22 07:08:23 EDT 2008


Author: wolfc
Date: 2008-09-22 07:08:23 -0400 (Mon, 22 Sep 2008)
New Revision: 78747

Modified:
   branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveInterceptor.java
Log:
JBPAPP-1186: merged 78711

Modified: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveInterceptor.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveInterceptor.java	2008-09-22 11:07:53 UTC (rev 78746)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveInterceptor.java	2008-09-22 11:08:23 UTC (rev 78747)
@@ -21,14 +21,14 @@
  */
 package org.jboss.ejb3.stateful;
 
+import javax.transaction.RollbackException;
 import javax.transaction.Synchronization;
+import javax.transaction.SystemException;
 import javax.transaction.Transaction;
-import javax.transaction.SystemException;
-import javax.transaction.RollbackException;
+
 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;
 
@@ -74,18 +74,18 @@
       {
          try
          {
-            StatefulBeanContext ctx = container.getCache().get(id);
-            container.invokePreDestroy(ctx);
+            container.getCache().remove(id);
          }
-         catch (Throwable t)
+         catch(Throwable t)
          {
-            if (!retainIfException)
-            {
-               container.getCache().remove(id);
-            }
+            // An exception thrown from afterCompletion is gobbled up
+            log.error("Removing bean " + id + " from " + container + " failed", t);
+            if(t instanceof Error)
+               throw (Error) t;
+            if(t instanceof RuntimeException)
+               throw (RuntimeException) t;
             throw new RuntimeException(t);
          }
-         container.getCache().remove(id);
       }
    }
 




More information about the jboss-cvs-commits mailing list