Author: richard.opalka(a)jboss.com
Date: 2008-02-28 06:45:18 -0500 (Thu, 28 Feb 2008)
New Revision: 5842
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMServerSequence.java
Log:
message number rollover results in sequence termination
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java 2008-02-28
11:38:08 UTC (rev 5841)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java 2008-02-28
11:45:18 UTC (rev 5842)
@@ -35,7 +35,6 @@
import javax.xml.ws.addressing.Relationship;
import org.jboss.logging.Logger;
-import org.jboss.util.NotImplementedException;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.extensions.wsrm.RMAddressingConstants;
@@ -213,7 +212,6 @@
RMTerminateSequence payload =
(RMTerminateSequence)data.get(rmConstants.getTerminateSequenceQName());
String seqIdentifier = payload.getIdentifier();
sequence = RMStore.deserialize(dataDir, seqIdentifier, true);
- //sequence = RMHelper.getServerSequenceByInboundId(seqIdentifier, sequences);
if (sequence == null)
{
throw getUnknownSequenceFault(seqIdentifier);
@@ -240,14 +238,19 @@
RMSequence payload = (RMSequence)data.get(rmConstants.getSequenceQName());
String seqIdentifier = payload.getIdentifier();
sequence = RMStore.deserialize(dataDir, seqIdentifier, true);
- //sequence = RMHelper.getServerSequenceByInboundId(seqIdentifier, sequences);
if (sequence == null)
{
throw getUnknownSequenceFault(seqIdentifier);
}
- sequence.addReceivedInboundMessage(payload.getMessageNumber());
- RMStore.serialize(dataDir, sequence);
+ try
+ {
+ sequence.addReceivedInboundMessage(payload.getMessageNumber());
+ }
+ finally
+ {
+ RMStore.serialize(dataDir, sequence);
+ }
protocolMessages.add(rmConstants.getSequenceAcknowledgementQName());
rmResponseContext.put(RMConstant.SEQUENCE_REFERENCE, sequence);
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMServerSequence.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMServerSequence.java 2008-02-28
11:38:08 UTC (rev 5841)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMServerSequence.java 2008-02-28
11:45:18 UTC (rev 5842)
@@ -146,6 +146,7 @@
Map<String, Object> detailsMap = new HashMap<String, Object>(3);
detailsMap.put(RMFaultConstant.IDENTIFIER, this.inboundId);
detailsMap.put(RMFaultConstant.MAX_MESSAGE_NUMBER, this.messageNumber);
+ this.terminate();
throw new RMFault(RMFaultCode.MESSAGE_NUMBER_ROLLOVER, detailsMap);
}
Show replies by date