summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointReferenceBuilderImpl.java15
-rw-r--r--java/sca/samples/pom.xml2
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 @@
<activeByDefault>true</activeByDefault>
</activation>
<modules>
- <!-- module>helloworld-bpel</module -->
+ <module>helloworld-bpel</module>
<module>calculator</module>
<module>calculator-equinox</module>
<module>calculator-osgi</module>