diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-08 21:09:07 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-08 21:09:07 +0000 |
commit | 60e15221d662716d9081d6863d4832131d2789a1 (patch) | |
tree | 7b578a103c935f2d661451af543f0753399102ad /java/sca/modules/endpoint/src/main | |
parent | 78b93434ca2200dcc690d67143ee3ea938359439 (diff) |
Add missing endpoint clone and add helloworld-bpel back into the build. The missing clone meant that the reference side wire was pointing directly to the service side endpoint. When the reference side wire endpoint was configured with the reference binding interface contract the service side wire was also being reconfigured erroneously
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@773103 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/endpoint/src/main')
-rw-r--r-- | java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointReferenceBuilderImpl.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointReferenceBuilderImpl.java b/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointReferenceBuilderImpl.java index ecb7a99ac7..f65ff634b4 100644 --- a/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointReferenceBuilderImpl.java +++ b/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointReferenceBuilderImpl.java @@ -303,24 +303,27 @@ public class EndpointReferenceBuilderImpl implements CompositeBuilder, EndpointR // populate the endpoint reference try { - Binding cloned = (Binding) referenceBinding.clone(); + Binding clonedBinding = (Binding) referenceBinding.clone(); // Set the binding URI to the URI of the target service // that has been matched if (referenceBinding.getURI() == null) { - cloned.setURI(serviceEndpoint.getBinding().getURI()); + clonedBinding.setURI(serviceEndpoint.getBinding().getURI()); } // TODO - EPR can we remove this? - if (cloned instanceof OptimizableBinding) { - OptimizableBinding optimizableBinding = (OptimizableBinding)cloned; + if (clonedBinding instanceof OptimizableBinding) { + OptimizableBinding optimizableBinding = (OptimizableBinding)clonedBinding; optimizableBinding.setTargetComponent(serviceEndpoint.getComponent()); optimizableBinding.setTargetComponentService(serviceEndpoint.getService()); optimizableBinding.setTargetBinding(serviceEndpoint.getBinding()); } - endpointReference.setBinding(cloned); - endpointReference.setTargetEndpoint(serviceEndpoint); + endpointReference.setBinding(clonedBinding); + + Endpoint2 clonedEndpoint = (Endpoint2)serviceEndpoint.clone(); + + endpointReference.setTargetEndpoint(clonedEndpoint); } catch (Exception ex) { // do nothing |