}
}
private NextAction handleDuplicateMessageException(final JaxwsApplicationMessage message, Packet request) throws UnknownSequenceException, RxRuntimeException {
// Is failed over during request processing?
final Sequence inboundSequence = rc.sequenceManager().getInboundSequence(message.getSequenceId());
if (inboundSequence.isFailedOver(message.getMessageNumber())) {
synchronized (message.getCorrelationId()) {
// this synchronization is needed so that all 3 operations occur before
// AbstractResponseHandler.getParentFiber() is invoked on the response thread
rc.suspendedFiberStorage.register(message.getCorrelationId(), Fiber.current());
return doSuspend(new Runnable() {
@Override
public void run() {
rc.destinationMessageHandler.putToDeliveryQueue(message);
}
});
}
}
// Microsoft replay model behavior where a request is sent only to give a ride to a
// previously generated and retained response
final Sequence outboundSequence = rc.sequenceManager().getBoundSequence(message.getSequenceId());
if (outboundSequence != null) {
final ApplicationMessage _responseMessage = outboundSequence.retrieveMessage(message.getCorrelationId());
if (_responseMessage == null) {
return doReturnWith(rc.protocolHandler.createEmptyAcknowledgementResponse(
rc.destinationMessageHandler.getAcknowledgementData(message.getSequenceId()),
request));
}