diff options
2 files changed, 11 insertions, 10 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/provider/CorbaBindingProviderFactory.java b/sca-java-2.x/trunk/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/provider/CorbaBindingProviderFactory.java index 86cb4afb7c..bf0cc34195 100644 --- a/sca-java-2.x/trunk/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/provider/CorbaBindingProviderFactory.java +++ b/sca-java-2.x/trunk/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/provider/CorbaBindingProviderFactory.java @@ -21,13 +21,10 @@ package org.apache.tuscany.sca.binding.corba.provider; import org.apache.tuscany.sca.binding.corba.CorbaBinding; import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.host.corba.CorbaHostExtensionPoint; import org.apache.tuscany.sca.host.corba.ExtensibleCorbaHost; import org.apache.tuscany.sca.provider.BindingProviderFactory; import org.apache.tuscany.sca.provider.ReferenceBindingProvider; import org.apache.tuscany.sca.provider.ServiceBindingProvider; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentService; import org.apache.tuscany.sca.runtime.RuntimeEndpoint; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; @@ -35,13 +32,10 @@ import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; * @version $Rev$ $Date$ */ public class CorbaBindingProviderFactory implements BindingProviderFactory<CorbaBinding> { - - private CorbaHostExtensionPoint chep; private ExtensibleCorbaHost host; public CorbaBindingProviderFactory(ExtensionPointRegistry registry) { - chep = registry.getExtensionPoint(CorbaHostExtensionPoint.class); - host = new ExtensibleCorbaHost(chep); + host = ExtensibleCorbaHost.getInstance(registry); } /** * @see org.apache.tuscany.sca.provider.BindingProviderFactory#createReferenceBindingProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference, org.apache.tuscany.sca.assembly.Binding) diff --git a/sca-java-2.x/trunk/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java b/sca-java-2.x/trunk/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java index 7e043667a9..644682e106 100644 --- a/sca-java-2.x/trunk/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java +++ b/sca-java-2.x/trunk/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java @@ -19,6 +19,8 @@ package org.apache.tuscany.sca.host.corba; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.omg.CORBA.Object; /** @@ -29,10 +31,15 @@ public class ExtensibleCorbaHost implements CorbaHost { private CorbaHostExtensionPoint hosts; - public ExtensibleCorbaHost(CorbaHostExtensionPoint chep) { - this.hosts = chep; + public ExtensibleCorbaHost(ExtensionPointRegistry registry) { + this.hosts = registry.getExtensionPoint(CorbaHostExtensionPoint.class); } - + + public static ExtensibleCorbaHost getInstance(ExtensionPointRegistry registry) { + UtilityExtensionPoint utilityExtensionPoint = registry.getExtensionPoint(UtilityExtensionPoint.class); + return utilityExtensionPoint.getUtility(ExtensibleCorbaHost.class); + } + public Object lookup(String uri) throws CorbaHostException { return getCorbaHost().lookup(uri); } |