public void processLocalTransactionCommittedEvent ( Object handle ) throws ResourceException { // A application level local transaction has been committed. final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "processLocalTransactionCommittedEvent" , handle ) ; if ( tc . isDebugEnabled ( ) ) { String cId = null ; try { cId = mcf . getCorrelator ( this ) ; } catch ( SQLException x ) { // will just log the exception here and ignore it since its in trace Tr . debug ( this , tc , "got an exception trying to get the correlator in commit, exception is: " , x ) ; } if ( cId != null ) { StringBuffer stbuf = new StringBuffer ( 200 ) ; stbuf . append ( "Correlator: DB2, ID: " ) ; stbuf . append ( cId ) ; if ( xares != null ) { stbuf . append ( " Transaction : " ) ; stbuf . append ( xares ) ; } stbuf . append ( " COMMIT" ) ; Tr . debug ( this , tc , stbuf . toString ( ) ) ; } } } ResourceException re = stateMgr . isValid ( WSStateManager . LT_COMMIT ) ; if ( re == null ) { // If no work was done during the transaction, the autoCommit value may still be // on. In this case, just no-op, since some drivers like ConnectJDBC 3.1 don't // allow commit/rollback when autoCommit is on. if ( ! currentAutoCommit ) try { // autoCommit is off sqlConn . commit ( ) ; } catch ( SQLException se ) { FFDCFilter . processException ( se , "com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.processLocalTransactionCommittedEvent" , "554" , this ) ; throw AdapterUtil . translateSQLException ( se , this , true , getClass ( ) ) ; } //Set the state only after the commit has succeeded. Else, we change the // state but it has not yet been committed. - a real mess // Already validated the state so just set it. stateMgr . transtate = WSStateManager . NO_TRANSACTION_ACTIVE ; } else { throw re ; } // Fill in the ConnectionEvent only if needed. connEvent . recycle ( ConnectionEvent . LOCAL_TRANSACTION_COMMITTED , null , handle ) ; if ( isTraceOn && tc . isEventEnabled ( ) ) Tr . event ( this , tc , "Firing LOCAL TRANSACTION COMMITTED event for: " + handle , this ) ; // loop through the listeners for ( int i = 0 ; i < numListeners ; i ++ ) { // send Local Transaction Committed event to the current listener ivEventListeners [ i ] . localTransactionCommitted ( connEvent ) ; } // Reset the indicator so lazy enlistment will be signaled if we end up in a // Global Transaction. wasLazilyEnlistedInGlobalTran = false ; // Replace ConnectionEvent caching with a single reusable instance per // ManagedConnection. if ( isTraceOn && tc . isEntryEnabled ( ) ) { Tr . exit ( this , tc , "processLocalTransactionCommittedEvent" ) ; } }
Process request for a LOCAL_TRANSACTION_COMMITTED event .