public void begin ( ) throws SIIncorrectCallException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "begin" ) ; // Are we currently in use? do we have work // we still need to commit? if ( _state == TransactionState . STATE_ACTIVE && _workList != null ) { SIIncorrectCallException ice = new SIIncorrectCallException ( nls . getFormattedMessage ( "TRAN_PROTOCOL_ERROR_SIMS1001" , null , "TRAN_PROTOCOL_ERROR_SIMS1001" ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) SibTr . event ( this , tc , "Cannot begin new LocalTran. Existing work needs completing first!" , ice ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "begin" ) ; throw ice ; } synchronized ( this ) { _ptid = null ; } _workList = null ; _size = 0 ; _callbacks . clear ( ) ; _state = TransactionState . STATE_ACTIVE ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "begin" ) ; }
Begin a new local transaction by readying this object for re - use by the ItemStream interfaces .