cxf git commit: [CXF-6667] Closing a source sequence in WS-RM may lead to inconsistent sequence status
Repository: cxf Updated Branches: refs/heads/3.0.x-fixes de2acc903 -> 0aec1458f [CXF-6667] Closing a source sequence in WS-RM may lead to inconsistent sequence status Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/0aec1458 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0aec1458 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0aec1458 Branch: refs/heads/3.0.x-fixes Commit: 0aec1458f4c69adc47c8613d9f41bef23655710c Parents: de2acc9 Author: Akitoshi Yoshida Authored: Wed Nov 4 15:32:57 2015 +0100 Committer: Akitoshi Yoshida Committed: Thu Nov 5 13:51:33 2015 +0100 -- .../cxf/ws/rm/RMCaptureOutInterceptor.java | 6 + .../java/org/apache/cxf/ws/rm/RMEndpoint.java | 1 - .../apache/cxf/systest/ws/rm/SequenceTest.java | 125 +++ 3 files changed, 131 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/0aec1458/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java -- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java index b52a6e8..8f1df9e 100644 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java @@ -199,6 +199,12 @@ public class RMCaptureOutInterceptor extends AbstractRMInterceptor { getManager().initializeInterceptorChain(msg); //doneCaptureMessage(msg); captureMessage(msg); +} else if (isLastMessage) { +// got either the rm11 CS or the rm10 empty LM +RMStore store = getManager().getStore(); +if (null != store) { +store.persistOutgoing(rmpsOut.getSourceSequence(), null); +} } } private void captureMessage(Message message) { http://git-wip-us.apache.org/repos/asf/cxf/blob/0aec1458/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java -- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java index 3146bac..e393124 100644 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java @@ -816,7 +816,6 @@ public class RMEndpoint { // REVISIT: this may be non-standard // getProxy().ackRequested(seq); } else { - getProxy().lastMessage(seq); } } catch (RMException ex) { http://git-wip-us.apache.org/repos/asf/cxf/blob/0aec1458/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java -- diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java index 1b3b9c3..49414f8 100644 --- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java +++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java @@ -23,9 +23,14 @@ import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; +import java.util.Collection; import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.concurrent.Executor; import java.util.concurrent.Executors; import java.util.logging.Logger; @@ -77,10 +82,15 @@ import org.apache.cxf.testutil.recorders.OutMessageRecorder; import org.apache.cxf.transport.http.HTTPConduit; import org.apache.cxf.transports.http.configuration.HTTPClientPolicy; import org.apache.cxf.ws.addressing.VersionTransformer.Names200408; +import org.apache.cxf.ws.rm.DestinationSequence; import org.apache.cxf.ws.rm.RM10Constants; import org.apache.cxf.ws.rm.RMContextUtils; import org.apache.cxf.ws.rm.RMManager; import org.apache.cxf.ws.rm.RMProperties; +import org.apache.cxf.ws.rm.SourceSequence; +import org.apache.cxf.ws.rm.persistence.RMMessage; +import org.apache.cxf.ws.rm.persistence.RMStore; +import org.apache.cxf.ws.rm.v200702.Identifier; import org.junit.After; import org.junit.BeforeClass; @@ -1392,6 +1402,11 @@ public class SequenceTest extends AbstractBusClientServerTestBase { public void testTerminateOnShutdown() throws Exception { init("org/apache/cxf/systest/ws/rm/terminate-on-shutdown.xml", true); +RMManage
cxf git commit: [CXF-6667] Closing a source sequence in WS-RM may lead to inconsistent sequence status
Repository: cxf Updated Branches: refs/heads/master b97a0fed6 -> 3aede31ec [CXF-6667] Closing a source sequence in WS-RM may lead to inconsistent sequence status Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/3aede31e Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/3aede31e Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/3aede31e Branch: refs/heads/master Commit: 3aede31ec2755468b6310591b4e3c467fb2b9ed2 Parents: b97a0fe Author: Akitoshi Yoshida Authored: Wed Nov 4 15:32:57 2015 +0100 Committer: Akitoshi Yoshida Committed: Thu Nov 5 11:55:08 2015 +0100 -- .../cxf/ws/rm/RMCaptureOutInterceptor.java | 6 + .../java/org/apache/cxf/ws/rm/RMEndpoint.java | 1 - .../apache/cxf/systest/ws/rm/SequenceTest.java | 125 +++ 3 files changed, 131 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/3aede31e/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java -- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java index 38e5f7c..298ddcd 100644 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java @@ -199,6 +199,12 @@ public class RMCaptureOutInterceptor extends AbstractRMInterceptor { getManager().initializeInterceptorChain(msg); //doneCaptureMessage(msg); captureMessage(msg); +} else if (isLastMessage) { +// got either the rm11 CS or the rm10 empty LM +RMStore store = getManager().getStore(); +if (null != store) { +store.persistOutgoing(rmpsOut.getSourceSequence(), null); +} } } private void captureMessage(Message message) { http://git-wip-us.apache.org/repos/asf/cxf/blob/3aede31e/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java -- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java index 3146bac..e393124 100644 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java @@ -816,7 +816,6 @@ public class RMEndpoint { // REVISIT: this may be non-standard // getProxy().ackRequested(seq); } else { - getProxy().lastMessage(seq); } } catch (RMException ex) { http://git-wip-us.apache.org/repos/asf/cxf/blob/3aede31e/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java -- diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java index f4124cf..346a0f6 100644 --- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java +++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java @@ -23,9 +23,14 @@ import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; +import java.util.Collection; import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.concurrent.Executor; import java.util.concurrent.Executors; import java.util.logging.Logger; @@ -77,10 +82,15 @@ import org.apache.cxf.testutil.recorders.OutMessageRecorder; import org.apache.cxf.transport.http.HTTPConduit; import org.apache.cxf.transports.http.configuration.HTTPClientPolicy; import org.apache.cxf.ws.addressing.VersionTransformer.Names200408; +import org.apache.cxf.ws.rm.DestinationSequence; import org.apache.cxf.ws.rm.RM10Constants; import org.apache.cxf.ws.rm.RMContextUtils; import org.apache.cxf.ws.rm.RMManager; import org.apache.cxf.ws.rm.RMProperties; +import org.apache.cxf.ws.rm.SourceSequence; +import org.apache.cxf.ws.rm.persistence.RMMessage; +import org.apache.cxf.ws.rm.persistence.RMStore; +import org.apache.cxf.ws.rm.v200702.Identifier; import org.junit.After; import org.junit.BeforeClass; @@ -1392,6 +1402,11 @@ public class SequenceTest extends AbstractBusClientServerTestBase { public void testTerminateOnShutdown() throws Exception { init("org/apache/cxf/systest/ws/rm/terminate-on-shutdown.xml", true); +RMManager manager