public final synchronized void incrementReferenceCount ( ) throws SevereMessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "incrementReferenceCount" ) ; if ( _referenceCountIsDecreasing ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) SibTr . event ( this , tc , "Cannot increment! Reference count has begun decreasing." ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "incrementReferenceCount" ) ; throw new SevereMessageStoreException ( "Cannot add more references to an item after one has been removed" ) ; } _referenceCount ++ ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "incrementReferenceCount" ) ; }
This method is called when a reference is being added by an active transaction and when a reference is being restored . It should only be called by the message store code .