@ Override public synchronized void addAssociation ( ) { final boolean traceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( traceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "addAssociation" ) ; if ( _activeAssociations > _suspendedAssociations ) { if ( traceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "addAssociation received incoming request for active context" ) ; try { setRollbackOnly ( ) ; } catch ( Exception ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.Transaction.JTA.TransactionImpl.addAssociation" , "1701" , this ) ; if ( traceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "setRollbackOnly threw exception" , ex ) ; // swallow this exception } if ( traceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "addAssociation throwing rolledback" ) ; throw new TRANSACTION_ROLLEDBACK ( "Context already active" ) ; } stopInactivityTimer ( ) ; _activeAssociations ++ ; if ( traceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "addAssociation" ) ; }
Called by interceptor when incoming request arrives . This polices the single threaded operation of the transaction .