diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java')
2 files changed, 7 insertions, 9 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCABindingProviderFactory.java b/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCABindingProviderFactory.java index 75d8de64ca..ecaa699ad3 100644 --- a/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCABindingProviderFactory.java +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCABindingProviderFactory.java @@ -21,8 +21,10 @@ package org.apache.tuscany.sca.binding.sca.provider; import org.apache.tuscany.sca.assembly.SCABinding; import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.provider.BindingProviderFactory; import org.apache.tuscany.sca.provider.ReferenceBindingProvider; +import org.apache.tuscany.sca.provider.SCABindingMapper; import org.apache.tuscany.sca.provider.ServiceBindingProvider; import org.apache.tuscany.sca.runtime.RuntimeEndpoint; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; @@ -35,9 +37,12 @@ import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; public class RuntimeSCABindingProviderFactory implements BindingProviderFactory<SCABinding> { private ExtensionPointRegistry extensionPoints; + private SCABindingMapper scaBindingMapper; public RuntimeSCABindingProviderFactory(ExtensionPointRegistry extensionPoints) { this.extensionPoints = extensionPoints; + UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); + this.scaBindingMapper = utilities.getUtility(SCABindingMapper.class); } public ReferenceBindingProvider createReferenceBindingProvider(RuntimeEndpointReference endpointReference) { @@ -45,7 +50,7 @@ public class RuntimeSCABindingProviderFactory implements BindingProviderFactory< } public ServiceBindingProvider createServiceBindingProvider(RuntimeEndpoint endpoint) { - return new RuntimeSCAServiceBindingProvider(extensionPoints, endpoint); + return new RuntimeSCAServiceBindingProvider(scaBindingMapper, endpoint); } public Class<SCABinding> getModelType() { diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java index 0a952e0540..fe95e5c7d0 100644 --- a/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java @@ -19,10 +19,6 @@ package org.apache.tuscany.sca.binding.sca.provider; -import java.util.Iterator; - -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.interfacedef.InterfaceContract; import org.apache.tuscany.sca.invocation.InvocationChain; import org.apache.tuscany.sca.invocation.InvokerAsyncResponse; @@ -47,13 +43,10 @@ public class RuntimeSCAServiceBindingProvider implements EndpointAsyncProvider, private RuntimeComponentService service; private ServiceBindingProvider distributedProvider; - private SCABindingMapper scaBindingMapper; - public RuntimeSCAServiceBindingProvider(ExtensionPointRegistry extensionPoints, RuntimeEndpoint endpoint) { + public RuntimeSCAServiceBindingProvider(SCABindingMapper scaBindingMapper, RuntimeEndpoint endpoint) { this.endpoint = endpoint; this.service = (RuntimeComponentService)endpoint.getService(); - UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); - this.scaBindingMapper = utilities.getUtility(SCABindingMapper.class); // if there is potentially a wire to this service that crosses the node boundary // then we need to create a remote endpoint |