summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-09-12 12:56:21 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-09-12 12:56:21 +0000
commit87a10062349ab91797f9cf3876b2e05885082cd7 (patch)
tree74c06fb6a38e92f688404f2c76fbf05650690fd4 /sca-java-2.x/trunk/modules/core
parent77e9e62a8753f29bbb0e4d048789060cc502a4c0 (diff)
Fix the setting of the JMS callback destination from request properties for the JMS binding
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1169722 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core')
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java
index 9dba10f605..fb8249544e 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java
@@ -150,7 +150,20 @@ public class CallbackServiceReferenceImpl<B> extends ServiceReferenceImpl<B> {
}
}
}
-/*
+
+ // This is used by the JMS binding to enable setting the JMS callback destination from the
+ // request, see CallbackDestinationInterceptor in the JMS binding module. It gets the JMS
+ // compliance tests passing again but doesn't seem like the perfect fix, when the changes
+ // mentioned below for TUSCANY-3932 happen it should fix this properly.
+ Message msgContext = ThreadMessageContext.getMessageContext();
+ if (msgContext != null){
+ Binding b = (Binding)msgContext.getHeaders().get("CALLBACK_BINDING");
+ if (b != null) {
+ endpointReference.setBinding(b);
+ }
+ }
+
+ /*
// TUSCANY-3932
// If the resolved endpoint has a binding with a absolute URI then assume
// that URL has been passed in in the forward message and really treat it