From 60e15221d662716d9081d6863d4832131d2789a1 Mon Sep 17 00:00:00 2001 From: slaws Date: Fri, 8 May 2009 21:09:07 +0000 Subject: 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 --- .../sca/endpoint/impl/EndpointReferenceBuilderImpl.java | 15 +++++++++------ java/sca/samples/pom.xml | 2 +- 2 files changed, 10 insertions(+), 7 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 diff --git a/java/sca/samples/pom.xml b/java/sca/samples/pom.xml index 2e336573eb..e4bc31ee15 100644 --- a/java/sca/samples/pom.xml +++ b/java/sca/samples/pom.xml @@ -43,7 +43,7 @@ true - + helloworld-bpel calculator calculator-equinox calculator-osgi -- cgit v1.2.3