CreateSequenceResponse createSeqResPart = (CreateSequenceResponse) createSeqResponse
.getMessagePart(Sandesha2Constants.MessageParts.CREATE_SEQ_RESPONSE);
// OFFER PROCESSING
SequenceOffer offer = createSeqPart.getSequenceOffer();
if (offer != null) {
Accept accept = createSeqResPart.getAccept();
if (accept == null) {
if (log.isDebugEnabled())
log.debug(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noAcceptPart));
FaultManager.makeCreateSequenceRefusedFault(createSeqRMMsg,
SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noAcceptPart),
new Exception());
// Return false if an Exception hasn't been thrown.
if (log.isDebugEnabled())
log.debug("Exit: CreateSeqMsgProcessor::processInMessage " + Boolean.FALSE);
return false;
}
// offered seq id
String offeredSequenceID = offer.getIdentifer().getIdentifier();
boolean offerEcepted = offerAccepted(offeredSequenceID, context, createSeqRMMsg, storageManager);
if (offerEcepted) {
// Setting the CreateSequence table entry for the outgoing
// side.
RMSBean rMSBean = new RMSBean();
rMSBean.setSequenceID(offeredSequenceID);
String outgoingSideInternalSequenceId = SandeshaUtil
.getOutgoingSideInternalSequenceID(rmdBean.getSequenceID());
rMSBean.setInternalSequenceID(outgoingSideInternalSequenceId);
// this is a dummy value
rMSBean.setCreateSeqMsgID(SandeshaUtil.getUUID());
rMSBean.setToEPR(rmdBean.getToEPR());
rMSBean.setAcksToEPR(rmdBean.getToEPR()); // The acks need to flow back into this endpoint
rMSBean.setReplyToEPR(rmdBean.getReplyToEPR());
rMSBean.setLastActivatedTime(System.currentTimeMillis());
rMSBean.setRMVersion(rmdBean.getRMVersion());
rMSBean.setClientCompletedMessages(new RangeString());
// Setting sequence properties for the outgoing sequence.
// Only will be used by the server side response path. Will
// be wasted properties for the client side.
Endpoint endpoint = offer.getEndpoint();
if (endpoint!=null) {
// setting the OfferedEndpoint
rMSBean.setOfferedEndPoint(endpoint.getEPR().getAddress());
}