public void resume ( LocalTransactionCoordinator ltc ) // throws IllegalStateException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "resume" , new Object [ ] { ltc , this } ) ; // If there's already an LTC on this thread and the LTC that we're // resuming is non-null then fail the resume attempt. This mirrors // the resume behaviour of the JTA code and also prevents problems // on Z when we attempt a resume when there's already context on // the thread; it dies a horrible death. if ( ltc != null && _coord != null ) { // We don't output a message here as manipulation of LTCs is only ever // done by system level code - there's nothing a user can do to // prevent this problem from occurring final IllegalStateException ise = new IllegalStateException ( ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "resume" , ise ) ; throw ise ; } _coord = ( LocalTranCoordImpl ) ltc ; if ( _coord != null ) { _coord . resume ( this ) ; // resume any native context invokeEventListener ( _coord , UOWEventListener . RESUME , null ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "resume" ) ; }
Associates an LTC scope with the thread . Any existing LTC is suspended first .