public void start ( PersistentTranId ptid , TransactionParticipant participant ) throws XidAlreadyKnownException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "start" , new Object [ ] { "PersistentTranId=" + ptid , "Participant=" + participant } ) ; // Defect 455354 // We need to make sure that any changes to the association // lists occur under a lock. // // We also need to check the _unassociatedTrans and _suspendedTrans lists // to make sure that we aren't being asked to start a new branch using an // Xid that is still running or in the process of being completed. synchronized ( _associationLock ) { if ( ! _associatedTrans . containsKey ( ptid ) && ! _unassociatedTrans . containsKey ( ptid ) && ! _suspendedTrans . containsKey ( ptid ) ) { _associatedTrans . put ( ptid , participant ) ; } else { XidAlreadyKnownException xake = new XidAlreadyKnownException ( "XID_ALREADY_ASSOCIATED_SIMS1009" , new Object [ ] { "start(XID,TMNOFLAGS)" , ptid . toTMString ( ) } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) SibTr . event ( this , tc , "Cannot start new association with this Xid. It is already known!" , xake ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "start" ) ; throw xake ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "start" ) ; }
with a NEW transaction branch .