summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2012-03-21 21:49:52 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2012-03-21 21:49:52 +0000
commita16f36a53eaefe3e6f60df7537baecb2ab6f9a11 (patch)
treebae776e35e2a60c12add97d3f968b785b52cb3a4 /sca-java-2.x/trunk/modules/core
parentbbf66bc5239e55a0edc5239c43be70a1fb8032ed (diff)
Revert the change based on the comment from https://issues.apache.org/jira/browse/TUSCANY-4029
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1303591 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/runtime/impl/EndpointReferenceBinderImpl.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
index d3f20320ac..0a504d4dba 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
@@ -338,6 +338,11 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder {
}
+ // [rfeng] Setup the target endpoint if the reference uses an explicit binding
+ if (endpointReference.getTargetEndpoint().getBinding() == null) {
+ endpointReference.getTargetEndpoint().setBinding(endpointReference.getBinding());
+ }
+
// Now the endpoint reference is resolved check that the binding interfaces contract
// and the reference contract are compatible
try {
@@ -500,12 +505,16 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder {
} else {
endpointReference.setTargetEndpoint(matchedEndpoint);
Binding binding = matchedEndpoint.getBinding();
+ // Reverted the change, see https://issues.apache.org/jira/browse/TUSCANY-4029
+ /*
try {
endpointReference.setBinding((Binding) binding.clone());
} catch (CloneNotSupportedException e) {
// shouldn't happen
throw new RuntimeException(e);
}
+ */
+ endpointReference.setBinding(binding);
// TUSCANY-3873 - add policy from the service
// we don't care about intents at this stage
endpointReference.getPolicySets().addAll(matchedEndpoint.getPolicySets());
@@ -528,6 +537,7 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder {
endpointReference.setStatus(EndpointReference.Status.WIRED_TARGET_FOUND_AND_MATCHED);
endpointReference.setUnresolved(false);
}
+
}
private void build(EndpointReference endpointReference) {