Transaction offerProcessTransaction = storageManager.getTransaction();
//processing for accept (offer has been sent)
Accept accept = createSeqResponsePart.getAccept();
if (accept != null) {
//Find offered sequence from internal sequence id.
SequencePropertyBean offeredSequenceBean = sequencePropMgr
.retrieve(internalSequenceId,
Sandesha2Constants.SequenceProperties.OFFERED_SEQUENCE);
//TODO this should be detected in the Fault manager.
if (offeredSequenceBean == null) {
String message = "No offered sequence entry. But an accept was received";
log.debug(message);
throw new SandeshaException(message);
}
String offeredSequenceId = (String) offeredSequenceBean.getValue();
EndpointReference acksToEPR = accept.getAcksTo().getAddress()
.getEpr();
SequencePropertyBean acksToBean = new SequencePropertyBean();
acksToBean.setName(Sandesha2Constants.SequenceProperties.ACKS_TO_EPR);
acksToBean.setSequenceID(offeredSequenceId);
acksToBean.setValue(acksToEPR.getAddress());