acksToBean.setSequencePropertyKey(offeredSequenceId);
acksToBean.setValue(acksToEPR.getAddress());
sequencePropMgr.insert(acksToBean);
RMDBean rmdBean = new RMDBean();
rmdBean.setSequenceID(offeredSequenceId);
rmdBean.setNextMsgNoToProcess(1);
boolean pollingMode = false;
if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(createSeqResponseRMMsgCtx.getRMSpecVersion())) {
String replyToAddress = SandeshaUtil.getSequenceProperty(sequencePropertyKey,
Sandesha2Constants.SequenceProperties.REPLY_TO_EPR, storageManager);
if (replyToAddress!=null) {
if (AddressingConstants.Submission.WSA_ANONYMOUS_URL.equals(replyToAddress))
pollingMode = true;
else if (AddressingConstants.Final.WSA_ANONYMOUS_URL.equals(replyToAddress))
pollingMode = true;
else if (replyToAddress.startsWith(Sandesha2Constants.WSRM_ANONYMOUS_URI_PREFIX))
pollingMode = true;
}
}
//Storing the referenceMessage of the sending side sequence as the reference message
//of the receiving side as well.
//This can be used when creating new outgoing messages.
String referenceMsgStoreKey = rmsBean.getReferenceMessageStoreKey();
MessageContext referenceMsg = storageManager.retrieveMessageContext(referenceMsgStoreKey, configCtx);
String newMessageStoreKey = SandeshaUtil.getUUID();
storageManager.storeMessageContext(newMessageStoreKey,referenceMsg);
rmdBean.setReferenceMessageKey(newMessageStoreKey);
rmdBean.setPollingMode(pollingMode);
//if PollingMode is true, starting the pollingmanager.
if (pollingMode)
SandeshaUtil.startPollingManager(configCtx);