Index: src/java/com/sun/ejb/containers/BaseContainer.java =================================================================== RCS file: /cvs/glassfish/appserv-core/src/java/com/sun/ejb/containers/BaseContainer.java,v retrieving revision 1.48.2.2 diff -c -r1.48.2.2 BaseContainer.java *** src/java/com/sun/ejb/containers/BaseContainer.java 4 Dec 2008 07:16:44 -0000 1.48.2.2 --- src/java/com/sun/ejb/containers/BaseContainer.java 5 Jan 2009 05:23:10 -0000 *************** *** 1351,1356 **** --- 1351,1367 ---- if ( inv.ejb != null ) { // counterpart of invocationManager.preInvoke if (! inv.useFastPath) { + try { + if( doTxProcessing ) { + postInvokeTx(inv); + } + } catch (Exception ex) { + _logger.log(Level.FINE, "ejb.postinvoketx_exception", ex); + if (ex instanceof EJBException) + inv.exception = (EJBException) ex; + else + inv.exception = new EJBException(ex); + } invocationManager.postInvoke(inv); if (isStatefulSession *************** *** 1372,1389 **** } } else { doTxProcessing = doTxProcessing && (inv.exception != null); ! } ! ! try { ! if( doTxProcessing ) { ! postInvokeTx(inv); } ! } catch (Exception ex) { ! _logger.log(Level.FINE, "ejb.postinvoketx_exception", ex); ! if (ex instanceof EJBException) ! inv.exception = (EJBException) ex; ! else ! inv.exception = new EJBException(ex); } releaseContext(inv); --- 1383,1401 ---- } } else { doTxProcessing = doTxProcessing && (inv.exception != null); ! ! try { ! if (doTxProcessing) { ! postInvokeTx(inv); ! } ! } catch (Exception ex) { ! _logger.log(Level.FINE, "ejb.postinvoketx_exception", ex); ! if (ex instanceof EJBException) ! inv.exception = (EJBException) ex; ! else ! inv.exception = new EJBException(ex); } ! } releaseContext(inv); *************** *** 3780,3785 **** --- 3792,3799 ---- if ( isSession && !isStatelessSession ) ((SessionContextImpl)context).setTxCompleting(true); + + transactionManager.delistComponentResources(false); // delist with TMSUCCESS // A new tx was started, so we must commit/rollback if ( newException != null Index: src/java/com/sun/enterprise/distributedtx/J2EETransactionManagerImpl.java =================================================================== RCS file: /cvs/glassfish/appserv-core/src/java/com/sun/enterprise/distributedtx/J2EETransactionManagerImpl.java,v retrieving revision 1.14.2.1 diff -c -r1.14.2.1 J2EETransactionManagerImpl.java *** src/java/com/sun/enterprise/distributedtx/J2EETransactionManagerImpl.java 10 Oct 2008 18:44:00 -0000 1.14.2.1 --- src/java/com/sun/enterprise/distributedtx/J2EETransactionManagerImpl.java 5 Jan 2009 05:24:58 -0000 *************** *** 666,673 **** public void postInvoke(ComponentInvocation curr, ComponentInvocation prev) throws InvocationException { - if ( curr != null && curr.getTransaction() != null ) - delistComponentResources(curr, false); // delist with TMSUCCESS if ( prev != null && prev.getTransaction() != null && prev.isTransactionCompleting() == false) { // do not worry about re-enlisting previous invocation resources --- 666,671 ----