sequence.setLastMessage(new LastMessage(factory,rmNamespaceValue));
}
}
}
AckRequested ackRequested = null;
boolean addAckRequested = false;
//if (!lastMessage)
// addAckRequested = true; //TODO decide the policy to add the ackRequested tag
// setting the Sequnece id.
// Set send = true/false depending on the availability of the out
// sequence id.
String identifierStr = null;
if (outSequenceBean == null || outSequenceBean.getValue() == null) {
identifierStr = Sandesha2Constants.TEMP_SEQUENCE_ID;
} else {
identifierStr = (String) outSequenceBean.getValue();
}
Identifier id1 = new Identifier(factory,rmNamespaceValue);
id1.setIndentifer(identifierStr);
sequence.setIdentifier(id1);
rmMsg.setMessagePart(Sandesha2Constants.MessageParts.SEQUENCE,sequence);
if (addAckRequested) {
ackRequested = new AckRequested(factory,rmNamespaceValue);
Identifier id2 = new Identifier(factory,rmNamespaceValue);
id2.setIndentifer(identifierStr);
ackRequested.setIdentifier(id2);
rmMsg.setMessagePart(Sandesha2Constants.MessageParts.ACK_REQUEST,
ackRequested);
}
try {