public ContainerTx getCurrentTx ( SynchronizationRegistryUOWScope uowId , boolean isLocal ) throws CSITransactionRolledbackException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; // d532639.2 if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getCurrentTx (" + ContainerTx . uowIdToString ( uowId ) + ", " + ( isLocal ? "local" : "global" ) + ")" ) ; ContainerTx result = null ; SynchronizationRegistryUOWScope currTxKey = uowId ; // If there is no transaction, then this is probably BMT and either // an EJB 1.1 module or the BMT transaction has been rolled back. // In either case, just allow the method to continue without a // ContainerTx. If there is a transaction, then look for an existing // ContainerTx, or create one if not found. if ( currTxKey != null ) { result = ( ContainerTx ) currTxKey . getResource ( containerTxResourceKey ) ; if ( result == null ) { result = ivEJBRuntime . createContainerTx ( this , ! isLocal , currTxKey , uowCtrl ) ; try { uowCtrl . enlistWithTransaction ( currTxKey , result ) ; } catch ( CSIException ex ) { FFDCFilter . processException ( ex , CLASS_NAME + ".getCurrentTx" , "1305" , this ) ; uowCtrl . setRollbackOnly ( ) ; throw new CSITransactionRolledbackException ( "Enlistment with transaction failed" , ex ) ; } currTxKey . putResource ( containerTxResourceKey , result ) ; } } if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getCurrentTx : " + result ) ; return result ; }
d139352 - 2