@ Override public void start ( Xid xid , int flags ) throws XAException { try { if ( xid == null ) { throw new XAException ( XAException . XAER_INVAL ) ; } // if resuming or joining an existing transaction if ( flags == TMRESUME ) { this . xaConnection . resumeTransactionalBranch ( xid ) ; } else if ( flags == TMJOIN || flags == TMNOFLAGS ) { this . xaConnection . startTransactionalBranch ( xid ) ; } LOG . debug ( "PhynixxXAResource[" + this . getId ( ) + "]:start xid='" + xid + "' flags='" + ConstantsPrinter . getXAResourceMessage ( flags ) + "'" + " Connected to " + this . xaConnection ) ; // start monitoring the timeout this . setTimeOutActive ( true ) ; } catch ( XAException xaExc ) { LOG . error ( "PhynixxXAResource[" + this . getId ( ) + "]:start xid='" + xid // maybe null, but doesn't matter for logging + "' flags='" + ConstantsPrinter . getXAResourceMessage ( flags ) + "'" + " ERROR " + ConstantsPrinter . getXAErrorCode ( xaExc . errorCode ) ) ; throw xaExc ; } catch ( Exception ex ) { LOG . error ( "PhynixxXAResource.start(" + xid + "," + flags + ") on XAResourceProgressState " + this . xaId + " :: " + ex + "\n" + ExceptionUtils . getStackTrace ( ex ) ) ; throw new DelegatedRuntimeException ( "start(" + xid + "," + flags + ") on XAResourceProgressState " + this . xaId , ex ) ; } }
transaction branch is interchangeably with transaction context