cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1335488 - in /cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm: Destination.java DestinationSequence.java
Date Tue, 08 May 2012 12:51:08 GMT
Author: ay
Date: Tue May  8 12:51:07 2012
New Revision: 1335488

URL: http://svn.apache.org/viewvc?rev=1335488&view=rev
Log:
[CXF-4297] WS-RM destination should update ack-ranges in RMStore before sending out ack

Modified:
    cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
    cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java

Modified: cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java?rev=1335488&r1=1335487&r2=1335488&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java (original)
+++ cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java Tue May  8 12:51:07
2012
@@ -29,14 +29,12 @@ import java.util.logging.Logger;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.ws.addressing.AddressingProperties;
-import org.apache.cxf.ws.rm.persistence.RMMessage;
 import org.apache.cxf.ws.rm.persistence.RMStore;
 import org.apache.cxf.ws.rm.v200702.AckRequestedType;
 import org.apache.cxf.ws.rm.v200702.Identifier;
@@ -112,8 +110,9 @@ public class Destination extends Abstrac
                 if (MessageUtils.isTrue(message.get(RMMessageConstants.DELIVERING_ROBUST_ONEWAY)))
{
                     return;
                 }
-                seq.acknowledge(message);
     
+                seq.acknowledge(message);
+
                 if (null != rmps.getCloseSequence()) {
                     seq.setLastMessageNumber(sequenceType.getMessageNumber());
                     ackImmediately(seq, message);
@@ -144,17 +143,6 @@ public class Destination extends Abstrac
             throw sff.createUnknownSequenceFault(sequenceType.getIdentifier());
         }
 
-        RMStore store = getReliableEndpoint().getManager().getStore();
-        if (null != store) {
-            RMMessage msg = null;
-            if (!MessageUtils.isTrue(message.getContextualProperty(Message.ROBUST_ONEWAY)))
{
-                msg = new RMMessage();
-                msg.setContent((CachedOutputStream)message.get(RMMessageConstants.SAVED_CONTENT));
-                msg.setMessageNumber(sequenceType.getMessageNumber());
-            }
-            store.persistIncoming(seq, msg);
-        }
-
     }
     
     void ackRequested(Message message) throws SequenceFault, RMException {

Modified: cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java?rev=1335488&r1=1335487&r2=1335488&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java (original)
+++ cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java Tue May
 8 12:51:07 2012
@@ -33,11 +33,13 @@ import org.apache.cxf.common.logging.Log
 import org.apache.cxf.continuations.Continuation;
 import org.apache.cxf.continuations.ContinuationProvider;
 import org.apache.cxf.continuations.SuspendedInvocationException;
+import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.ws.rm.manager.AcksPolicyType;
 import org.apache.cxf.ws.rm.manager.DeliveryAssuranceType;
+import org.apache.cxf.ws.rm.persistence.RMMessage;
 import org.apache.cxf.ws.rm.persistence.RMStore;
 import org.apache.cxf.ws.rm.policy.RM10PolicyUtils;
 import org.apache.cxf.ws.rm.v200702.Identifier;
@@ -163,6 +165,17 @@ public class DestinationSequence extends
             }
             mergeRanges();
         }
+
+        RMStore store = destination.getManager().getStore();
+        if (null != store) {
+            RMMessage msg = null;
+            if (!MessageUtils.isTrue(message.getContextualProperty(Message.ROBUST_ONEWAY)))
{
+                msg = new RMMessage();
+                msg.setContent((CachedOutputStream)message.get(RMMessageConstants.SAVED_CONTENT));
+                msg.setMessageNumber(st.getMessageNumber());
+            }
+            store.persistIncoming(this, msg);
+        }
         
         RMAssertion rma = RM10PolicyUtils.getRMAssertion(destination.getManager().getRMAssertion(),
message);
         long acknowledgementInterval = 0;



Mime
View raw message