diff options
Diffstat (limited to 'java/sca/modules/core')
-rw-r--r-- | java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl2.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl2.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl2.java index 3f93bf7cdd..b84717467f 100644 --- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl2.java +++ b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl2.java @@ -704,16 +704,18 @@ public class CompositeActivatorImpl2 implements CompositeActivator { // if there is a binding an endpoint has been found for the endpoint reference if (endpointReference.getBinding() != null){ - // add the binding provider + // add the binding provider. This is apparently a repeat + // of previous configuration as self references are created + // on the fly and miss the previous point where providers are added RuntimeComponentReference runtimeRef = (RuntimeComponentReference)componentReference; - final ReferenceBindingProvider bindingProvider = runtimeRef.getBindingProvider(endpointReference.getBinding()); -/* TODO - Is this actually required - if (bindingProvider == null) { - bindingProvider = addReferenceBindingProvider(component, componentReference, endpointReference.getBinding()); + if (runtimeRef.getBindingProvider(endpointReference.getBinding()) == null) { + addReferenceBindingProvider(component, componentReference, endpointReference.getBinding()); } -*/ - // start the binding provider + + // start the binding provider + final ReferenceBindingProvider bindingProvider = runtimeRef.getBindingProvider(endpointReference.getBinding()); + if (bindingProvider != null) { // Allow bindings to add shutdown hooks. Requires RuntimePermission shutdownHooks in policy. AccessController.doPrivileged(new PrivilegedAction<Object>() { @@ -797,7 +799,7 @@ public class CompositeActivatorImpl2 implements CompositeActivator { */ // create the wire - RuntimeWire wire = new RuntimeWireImpl2(false, + RuntimeWire wire = new RuntimeWireImpl2(true, endpointReference, endpoint, interfaceContractMapper, |