boolean anonReplyTo = replyTo==null || replyTo.isWSAddressingAnonymous(); //if this is wsa anonymous
//then we might be using replay
// Compare the clientCompletedMessages with the range we just got, to work out if there
// is any new information in this ack message
RangeString completedMessages = rmsBean.getClientCompletedMessages();
long numberOfNewMessagesAcked = 0;
boolean ackNeedsToSendInvalidFault = false; //if this ack includes a msg that we have not sent then
//we should try to send a fault back to the client
Range firstInvalidRange = null; //If there is a single invalid range then we set it here.
//If there is more than one we report the first invalid range
//adding a MakeConnection for the response sequence if needed.
if (rmsBean.getOfferedSequence() != null) {
RMDBeanMgr rMDBeanMgr = storageManager.getRMDBeanMgr();
RMDBean rMDBean = rMDBeanMgr.retrieve(outSequenceId);
if (rMDBean!=null && rMDBean.isPollingMode()) {
PollingManager manager = storageManager.getPollingManager();
if(manager != null) manager.schedulePollingRequest(rMDBean.getSequenceID(), false);
}
}
while(ackRangeIterator.hasNext()) {
Range ackRange = (Range) ackRangeIterator.next();
long lower = ackRange.lowerValue;
long upper = ackRange.upperValue;
Range ackedRange = new Range(lower, upper);
// Quick check to see if the whole range is already covered
if(!completedMessages.isRangeCompleted(ackedRange)) {
//we now know that this range is complete so we update it. This should aggregate the
//ranges together and tell us which numbers are newly acked
Range[] newRanges = completedMessages.addRange(ackedRange).getRanges();
// We now take each newly acked message in turn and see if we need to update a sender bean
for (int rangeIndex=0; rangeIndex < newRanges.length; rangeIndex++) {
//now work on each newly acked message in this range
for(long messageNo = newRanges[rangeIndex].lowerValue; messageNo<=newRanges[rangeIndex].upperValue; messageNo++){