public TransactionParticipant start(PersistentTranId ptid, int flags) throws XidUnknownException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "start", new Object[]{"PersistentTranId="+ptid, xaFlagsToString(flags)});

        TransactionParticipant retval = null;

        if ((flags & XAResource.TMJOIN) != 0)
        {
            // Find the existing branch in the associated
            // and return it so that the XAResource can
            // associate with it.
            retval = _associatedTrans.get(ptid);

            if (retval == null)
            {
                XidUnknownException xue = new XidUnknownException("XID_NOT_RECOGNISED_SIMS1007", new Object[]{"start(XID,TMJOIN)", ptid.toTMString()});
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Cannot JOIN with this Xid. It has not previously been started!", xue);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "start");
                throw xue;
            }
        }
        else if ((flags & XAResource.TMRESUME) != 0)
        {
            // Defect 455354
            // We need to make sure that any changes to the association
            // lists occur under a lock.
            synchronized(_associationLock)
            {
                // Find the existing branch in the suspended
                // list and move it to the associated list.
                retval = _suspendedTrans.remove(ptid);

                if (retval == null)
                {
                    XidUnknownException xue = new XidUnknownException("XID_NOT_RECOGNISED_SIMS1007", new Object[]{"start(XID,TMRESUME)", ptid.toTMString()});
                    if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Cannot RESUME this Xid. It has not previously been SUSPENDED!", xue);
                    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "start");
                    throw xue;
                }
                else
                {
                    _associatedTrans.put(ptid, retval);
                }
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "start", "return="+retval);
        return retval;
    }
public TransactionParticipant start ( PersistentTranId ptid , int flags ) throws XidUnknownException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "start" , new Object [ ] { "PersistentTranId=" + ptid , xaFlagsToString ( flags ) } ) ; TransactionParticipant retval = null ; if ( ( flags & XAResource . TMJOIN ) != 0 ) { retval = _associatedTrans . get ( ptid ) ; if ( retval == null ) { XidUnknownException xue = new XidUnknownException ( "XID_NOT_RECOGNISED_SIMS1007" , new Object [ ] { "start(XID,TMJOIN)" , ptid . toTMString ( ) } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) SibTr . event ( this , tc , "Cannot JOIN with this Xid. It has not previously been started!" , xue ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "start" ) ; throw xue ; } } else if ( ( flags & XAResource . TMRESUME ) != 0 ) { synchronized ( _associationLock ) { retval = _suspendedTrans . remove ( ptid ) ; if ( retval == null ) { XidUnknownException xue = new XidUnknownException ( "XID_NOT_RECOGNISED_SIMS1007" , new Object [ ] { "start(XID,TMRESUME)" , ptid . toTMString ( ) } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) SibTr . event ( this , tc , "Cannot RESUME this Xid. It has not previously been SUSPENDED!" , xue ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "start" ) ; throw xue ; } else { _associatedTrans . put ( ptid , retval ) ; } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "start" , "return=" + retval ) ; return retval ; }
using either the TMJOIN or TMRESUME flags.