You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2017/06/20 17:38:41 UTC
cxf git commit: [CXF-7415] RM messages would not have anything
asserted at this point, just results in bogus logs
Repository: cxf
Updated Branches:
refs/heads/master 24694c66d -> 01933b8ae
[CXF-7415] RM messages would not have anything asserted at this point, just results in bogus logs
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/01933b8a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/01933b8a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/01933b8a
Branch: refs/heads/master
Commit: 01933b8ae96dfef103d1bdc9fc922f644c581485
Parents: 24694c6
Author: Daniel Kulp <dk...@apache.org>
Authored: Tue Jun 20 13:21:43 2017 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Tue Jun 20 13:22:11 2017 -0400
----------------------------------------------------------------------
.../apache/cxf/ws/rm/DestinationSequence.java | 48 +++++++-------------
.../org/apache/cxf/ws/rm/RMInInterceptor.java | 3 +-
2 files changed, 17 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/01933b8a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
----------------------------------------------------------------------
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
index 336db1f..a7cc5df 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
@@ -41,7 +41,6 @@ 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.policy.PolicyVerificationInInterceptor;
import org.apache.cxf.ws.rm.RMConfiguration.DeliveryAssurance;
import org.apache.cxf.ws.rm.manager.AcksPolicyType;
import org.apache.cxf.ws.rm.persistence.PersistenceUtils;
@@ -184,39 +183,24 @@ public class DestinationSequence extends AbstractSequence {
if (updated) {
RMStore store = destination.getManager().getStore();
- if (null != store) {
- // only save message, when policy verification is successful
- // otherwise msgs will be stored and redelivered which do not pass initial verification
- // as interceptor is called in a later phase than the capturing
- PolicyVerificationInInterceptor intercep = new PolicyVerificationInInterceptor();
- boolean policiesVerified = false;
+ if (null != store && !MessageUtils.isTrue(message.getContextualProperty(Message.ROBUST_ONEWAY))) {
try {
- intercep.handleMessage(message);
- policiesVerified = true;
- } catch (Fault e) {
- // Ignore
- }
- RMMessage msg = null;
- if (policiesVerified
- && !MessageUtils.isTrue(message.getContextualProperty(Message.ROBUST_ONEWAY))) {
- try {
- msg = new RMMessage();
- CachedOutputStream cos = (CachedOutputStream)message
- .get(RMMessageConstants.SAVED_CONTENT);
- msg.setMessageNumber(st.getMessageNumber());
- msg.setCreatedTime(rmps.getCreatedTime());
- // in case no attachments are available, cos can be saved directly
- if (message.getAttachments() == null) {
- msg.setContent(cos);
- msg.setContentType((String)message.get(Message.CONTENT_TYPE));
- } else {
- InputStream is = cos.getInputStream();
- PersistenceUtils.encodeRMContent(msg, message, is);
- }
- store.persistIncoming(this, msg);
- } catch (IOException e) {
- throw new Fault(e);
+ RMMessage msg = new RMMessage();
+ CachedOutputStream cos = (CachedOutputStream)message
+ .get(RMMessageConstants.SAVED_CONTENT);
+ msg.setMessageNumber(st.getMessageNumber());
+ msg.setCreatedTime(rmps.getCreatedTime());
+ // in case no attachments are available, cos can be saved directly
+ if (message.getAttachments() == null) {
+ msg.setContent(cos);
+ msg.setContentType((String)message.get(Message.CONTENT_TYPE));
+ } else {
+ InputStream is = cos.getInputStream();
+ PersistenceUtils.encodeRMContent(msg, message, is);
}
+ store.persistIncoming(this, msg);
+ } catch (IOException e) {
+ throw new Fault(e);
}
}
}
http://git-wip-us.apache.org/repos/asf/cxf/blob/01933b8a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMInInterceptor.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMInInterceptor.java
index ba576fc..a2080e4 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMInInterceptor.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMInInterceptor.java
@@ -188,6 +188,7 @@ public class RMInInterceptor extends AbstractRMInterceptor<Message> {
RMEndpoint rme = getManager().getReliableEndpoint(message);
Destination destination = getManager().getDestination(message);
+ assertReliability(message);
if (isApplicationMessage) {
if (null != rmps) {
processAcknowledgments(rme, rmps, protocol);
@@ -225,8 +226,6 @@ public class RMInInterceptor extends AbstractRMInterceptor<Message> {
return;
}
}
-
- assertReliability(message);
}
void processAcknowledgments(RMEndpoint rme, RMProperties rmps, ProtocolVariation protocol)