cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1335535 - in /cxf/branches/2.4.x-fixes: ./ rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationTest.java
Date Tue, 08 May 2012 14:03:11 GMT
Author: ay
Date: Tue May  8 14:03:11 2012
New Revision: 1335535

URL: http://svn.apache.org/viewvc?rev=1335535&view=rev
Log:
Merged revisions 1335492 via  svn merge from
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

........
  r1335492 | ay | 2012-05-08 14:59:30 +0200 (Tue, 08 May 2012) | 9 lines
  
  Merged revisions 1335488 via  svn merge from
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1335488 | ay | 2012-05-08 14:51:07 +0200 (Tue, 08 May 2012) | 1 line
    
    [CXF-4297] WS-RM destination should update ack-ranges in RMStore before sending out ack
  ........
  
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
    cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
    cxf/branches/2.4.x-fixes/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationTest.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java?rev=1335535&r1=1335534&r2=1335535&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
Tue May  8 14:03:11 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.AddressingPropertiesImpl;
-import org.apache.cxf.ws.rm.persistence.RMMessage;
 import org.apache.cxf.ws.rm.persistence.RMStore;
 
 public class Destination extends AbstractEndpoint {
@@ -108,8 +106,9 @@ public class Destination extends Abstrac
                 if (MessageUtils.isTrue(message.get(RMMessageConstants.DELIVERING_ROBUST_ONEWAY)))
{
                     return;
                 }
-                seq.acknowledge(message);
     
+                seq.acknowledge(message);
+
                 if (null != sequenceType.getLastMessage()) {
                     seq.setLastMessageNumber(sequenceType.getMessageNumber());
                     ackImmediately(seq, message);
@@ -138,17 +137,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/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java?rev=1335535&r1=1335534&r2=1335535&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
Tue May  8 14:03:11 2012
@@ -33,12 +33,14 @@ 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.v200408.EndpointReferenceType;
 import org.apache.cxf.ws.rm.SequenceAcknowledgement.AcknowledgementRange;
 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.PolicyUtils;
 import org.apache.cxf.ws.rm.policy.RMAssertion;
@@ -152,7 +154,18 @@ public class DestinationSequence extends
             mergeRanges();
             wakeupAll();
         }
-                
+
+        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 = PolicyUtils.getRMAssertion(destination.getManager().getRMAssertion(),
message);
         long acknowledgementInterval = 0;
         AcknowledgementInterval ai = rma.getAcknowledgementInterval();

Modified: cxf/branches/2.4.x-fixes/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationTest.java?rev=1335535&r1=1335534&r2=1335535&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationTest.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationTest.java
Tue May  8 14:03:11 2012
@@ -173,7 +173,7 @@ public class DestinationTest extends Ass
         Identifier id = control.createMock(Identifier.class);
         EasyMock.expect(st.getIdentifier()).andReturn(id); 
         long nr = 10;
-        EasyMock.expect(st.getMessageNumber()).andReturn(nr).times(3);
+        EasyMock.expect(st.getMessageNumber()).andReturn(nr).anyTimes();
         DestinationSequence ds = control.createMock(DestinationSequence.class);
         EasyMock.expect(destination.getSequence(id)).andReturn(ds);
         
@@ -191,7 +191,7 @@ public class DestinationTest extends Ass
         EasyMock.expect(message.get(Message.REQUESTOR_ROLE)).andReturn(null);
         EasyMock.expect(message.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND)).andReturn(maps);
         EndpointReferenceType replyToEPR = control.createMock(EndpointReferenceType.class);
-        EasyMock.expect(maps.getReplyTo()).andReturn(replyToEPR).times(2);
+        EasyMock.expect(maps.getReplyTo()).andReturn(replyToEPR).anyTimes();
         AttributedURIType replyToURI = control.createMock(AttributedURIType.class);
         EasyMock.expect(replyToEPR.getAddress()).andReturn(replyToURI);
         String replyToAddress = "replyTo";        
@@ -204,11 +204,11 @@ public class DestinationTest extends Ass
         String acksToAddress = "acksTo";
         EasyMock.expect(acksToURI.getValue()).andReturn(acksToAddress);
         EasyMock.expect(ds.canPiggybackAckOnPartialResponse()).andReturn(false);
-        EasyMock.expect(destination.getReliableEndpoint()).andReturn(rme).times(2);
+        EasyMock.expect(destination.getReliableEndpoint()).andReturn(rme).anyTimes();
         RMManager manager = control.createMock(RMManager.class);
-        EasyMock.expect(rme.getManager()).andReturn(manager);
+        EasyMock.expect(rme.getManager()).andReturn(manager).anyTimes();
         RMStore store = control.createMock(RMStore.class);
-        EasyMock.expect(manager.getStore()).andReturn(store);
+        EasyMock.expect(manager.getStore()).andReturn(store).anyTimes();
         Proxy proxy = control.createMock(Proxy.class);
         EasyMock.expect(rme.getProxy()).andReturn(proxy);
         proxy.acknowledge(ds);



Mime
View raw message