public TransactionCommon registerInBatch ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "registerInBatch" ) ; _readWriteLock . lock ( ) ; // Register as a reader synchronized ( this ) // lock the state against other readers { if ( _currentTran == null ) _currentTran = _txManager . createLocalTransaction ( false ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "registerInBatch" , _currentTran ) ; return _currentTran ; }
Register an interest in the current batch . The batch can not be completed until messagesAdded is called .