public void unlockUnseen() 
      throws SIResourceException, SIConnectionDroppedException, SIConnectionLostException,   // F247845
             SIIncorrectCallException, SIMessageNotLockedException
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc,"unlockUnseen");
    
      // The conversation helper needs a properly sized array of id's, so first create an array
      // that is as large as we'll ever need it to be, populate it and then resize it.
      SIMessageHandle[] idsToUnlock = new SIMessageHandle[getUnSeenMessageCount()];

      int arrayPos = 0;
      for (int startingIndex = nextIndex; startingIndex < messages.length; startingIndex++)
      {
         if (messages[startingIndex] != null)
         {
            // Start F247845
            if (CommsUtils.isRecoverable(messages[startingIndex], consumerSession.getUnrecoverableReliability()))
            {
               idsToUnlock[arrayPos] = messages[startingIndex].getMessageHandle();
               arrayPos++;
            }
            // End F247845
            
            // Delete it from the main pile
            messages[startingIndex] = null;
         }
      }
      
      //Resize array to prevent NPEs.
      if(idsToUnlock.length != arrayPos)
      {
         if(TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "compacting array");
         
         final SIMessageHandle[] tempArray = new SIMessageHandle[arrayPos];
         System.arraycopy(idsToUnlock, 0, tempArray, 0, arrayPos);
         idsToUnlock = tempArray;
      }
      
      convHelper.unlockSet(idsToUnlock);
      
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc,"unlockUnseen");
   }
public void unlockUnseen ( ) throws SIResourceException , SIConnectionDroppedException , SIConnectionLostException , SIIncorrectCallException , SIMessageNotLockedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "unlockUnseen" ) ; SIMessageHandle [ ] idsToUnlock = new SIMessageHandle [ getUnSeenMessageCount ( ) ] ; int arrayPos = 0 ; for ( int startingIndex = nextIndex ; startingIndex < messages . length ; startingIndex ++ ) { if ( messages [ startingIndex ] != null ) { if ( CommsUtils . isRecoverable ( messages [ startingIndex ] , consumerSession . getUnrecoverableReliability ( ) ) ) { idsToUnlock [ arrayPos ] = messages [ startingIndex ] . getMessageHandle ( ) ; arrayPos ++ ; } messages [ startingIndex ] = null ; } } if ( idsToUnlock . length != arrayPos ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "compacting array" ) ; final SIMessageHandle [ ] tempArray = new SIMessageHandle [ arrayPos ] ; System . arraycopy ( idsToUnlock , 0 , tempArray , 0 , arrayPos ) ; idsToUnlock = tempArray ; } convHelper . unlockSet ( idsToUnlock ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "unlockUnseen" ) ; }
begin F219476.2