public final void unlockRejectedTick(TransactionCommon t, AOValue storedTick) throws MessageStoreException, SIResourceException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "unlockRejectedTick");

    try {
      SIMPMessage msg =
        consumerDispatcher.getMessageByValue(storedTick);

      Transaction msTran = mp.resolveAndEnlistMsgStoreTransaction(t);
      
      if(msg != null)
      {
        // Set the rme unlock count into the Messageitem so it can be taken into
        // account on further rollback threshold checks. (Note we take one off
        // because the following operation will perform an unlock itself)
        // 488794.
    	boolean incrementCount = false;

        // TODO: THIS DOESN'T WORK - MsgStore does not support the use of 'don't increment count'
        // when unlocking a persistently locked message (i.e. one of these). So the count will
        // get incremented anyway. So if the message has been rejected because it was never consumed
        // (and therefore, shouldn't have the count incremented) the unlock count WILL be incremented
        // which could cause us to exception it.
    	
    	// TODO: However, this is still an improvement on the pre-V7 logic and not a regression
    	// so we'll leave it as is unless someone complains.
        
        // TODO: I also doubt all this logic as the rmeUnlockCount is only transient, if MsgStore
        // chooses to un-cache this message we'll lose the extra count info. Although I guess it does
        // solve the case when the RME has rolled it back enough to reach the max failure limit, so I
        // guess we leave it as is.
    	if(storedTick.rmeUnlockCount > 0)
    	{
          incrementCount = true;
          msg.setRMEUnlockCount(storedTick.rmeUnlockCount - 1);
    	}
        if (msg.getLockID()==storedTick.getPLockId())
          msg.unlockMsg(storedTick.getPLockId(), msTran, incrementCount);
      }
      storedTick.lockItemIfAvailable(controlItemLockID); // should always be successful
      storedTick.remove(msTran, controlItemLockID);
    }
    catch (MessageStoreException e)
    {
      // No FFDC code needed
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "unlockRejectedTick", e);

      throw e;
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "unlockRejectedTick");
  }
public final void unlockRejectedTick ( TransactionCommon t , AOValue storedTick ) throws MessageStoreException , SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "unlockRejectedTick" ) ; try { SIMPMessage msg = consumerDispatcher . getMessageByValue ( storedTick ) ; Transaction msTran = mp . resolveAndEnlistMsgStoreTransaction ( t ) ; if ( msg != null ) { boolean incrementCount = false ; if ( storedTick . rmeUnlockCount > 0 ) { incrementCount = true ; msg . setRMEUnlockCount ( storedTick . rmeUnlockCount - 1 ) ; } if ( msg . getLockID ( ) == storedTick . getPLockId ( ) ) msg . unlockMsg ( storedTick . getPLockId ( ) , msTran , incrementCount ) ; } storedTick . lockItemIfAvailable ( controlItemLockID ) ; storedTick . remove ( msTran , controlItemLockID ) ; } catch ( MessageStoreException e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "unlockRejectedTick" , e ) ; throw e ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "unlockRejectedTick" ) ; }
Helper method called by the AOStream when a persistent tick representing a persistently locked
message should be removed since the message has been rejected. This method will also unlock the
message
@param t the transaction
@param stream the stream making this call
@param storedTick the persistent tick
@throws SIResourceException
@throws Exception