diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2012-03-19 08:09:04 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2012-03-19 08:09:04 +0000 |
commit | a89ed2121f40c0c3ecf8d0a40171937c3dfa1e35 (patch) | |
tree | e359a2ed611c8762ae29681cd8b2020e47d1d9c9 /sca-java-2.x/trunk/modules/core/src/main | |
parent | 63bcfde17b7117592c3195666598d9b95be3200e (diff) |
TUSCANY-4029: Clone the binding when setting it on the EndpointReference to ensure its not the same instance as that used by the Endpoint.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1302317 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java | 8 |
1 files changed, 6 insertions, 2 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 536534b743..d3f20320ac 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 @@ -42,7 +42,6 @@ import org.apache.tuscany.sca.assembly.builder.BuilderContext; import org.apache.tuscany.sca.assembly.builder.BuilderExtensionPoint; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.PolicyBuilder; -import org.apache.tuscany.sca.assembly.xml.Messages; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.UtilityExtensionPoint; @@ -501,7 +500,12 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder { } else { endpointReference.setTargetEndpoint(matchedEndpoint); Binding binding = matchedEndpoint.getBinding(); - endpointReference.setBinding(binding); + try { + endpointReference.setBinding((Binding) binding.clone()); + } catch (CloneNotSupportedException e) { + // shouldn't happen + throw new RuntimeException(e); + } // TUSCANY-3873 - add policy from the service // we don't care about intents at this stage endpointReference.getPolicySets().addAll(matchedEndpoint.getPolicySets()); |