diff options
Diffstat (limited to '')
4 files changed, 7 insertions, 5 deletions
diff --git a/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/DefaultContextFactoryExtensionPoint.java b/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/DefaultContextFactoryExtensionPoint.java index 5a0aefe55d..7a35036f03 100644 --- a/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/DefaultContextFactoryExtensionPoint.java +++ b/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/DefaultContextFactoryExtensionPoint.java @@ -23,6 +23,7 @@ import java.lang.reflect.Constructor; import java.util.HashMap; import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.extensibility.ServiceDeclaration; import org.apache.tuscany.sca.extensibility.ServiceDiscovery; /** @@ -93,8 +94,9 @@ public class DefaultContextFactoryExtensionPoint implements ContextFactoryExtens // Dynamically load a factory class declared under META-INF/services try { - Class<?> factoryClass = ServiceDiscovery.getInstance().loadFirstServiceClass(factoryInterface); - if (factoryClass != null) { + ServiceDeclaration factoryDeclaration = ServiceDiscovery.getInstance().getFirstServiceDeclaration(factoryInterface.getName()); + if (factoryDeclaration != null) { + Class<?> factoryClass = factoryDeclaration.loadClass(); // Default empty constructor Constructor<?> constructor = factoryClass.getConstructor(ExtensionPointRegistry.class); diff --git a/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/endpointresolver/DefaultEndpointResolverFactoryExtensionPoint.java b/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/endpointresolver/DefaultEndpointResolverFactoryExtensionPoint.java index 2849c27c1a..81f619cef3 100644 --- a/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/endpointresolver/DefaultEndpointResolverFactoryExtensionPoint.java +++ b/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/endpointresolver/DefaultEndpointResolverFactoryExtensionPoint.java @@ -100,7 +100,7 @@ public class DefaultEndpointResolverFactoryExtensionPoint implements EndpointRes Set<ServiceDeclaration> factoryDeclarations; ServiceDiscovery serviceDiscovery = ServiceDiscovery.getInstance(); try { - factoryDeclarations = serviceDiscovery.getServiceDeclarations(EndpointResolverFactory.class); + factoryDeclarations = serviceDiscovery.getServiceDeclarations(EndpointResolverFactory.class.getName()); } catch (Exception e) { throw new IllegalStateException(e); } diff --git a/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultProviderFactoryExtensionPoint.java b/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultProviderFactoryExtensionPoint.java index dfc3ddb468..0b7b779b46 100644 --- a/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultProviderFactoryExtensionPoint.java +++ b/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultProviderFactoryExtensionPoint.java @@ -129,7 +129,7 @@ public class DefaultProviderFactoryExtensionPoint implements ProviderFactoryExte Set<ServiceDeclaration> factoryDeclarations; ServiceDiscovery serviceDiscovery = ServiceDiscovery.getInstance(); try { - factoryDeclarations = serviceDiscovery.getServiceDeclarations(factoryClass); + factoryDeclarations = serviceDiscovery.getServiceDeclarations(factoryClass.getName()); } catch (Exception e) { throw new IllegalStateException(e); } diff --git a/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultSCADefinitionsProviderExtensionPoint.java b/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultSCADefinitionsProviderExtensionPoint.java index 068d0d12d7..3e1f1a10c5 100644 --- a/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultSCADefinitionsProviderExtensionPoint.java +++ b/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultSCADefinitionsProviderExtensionPoint.java @@ -68,7 +68,7 @@ public class DefaultSCADefinitionsProviderExtensionPoint implements try { defnProviderDecls = - ServiceDiscovery.getInstance().getServiceDeclarations(SCADefinitionsProvider.class); + ServiceDiscovery.getInstance().getServiceDeclarations(SCADefinitionsProvider.class.getName()); for (ServiceDeclaration aDefnProviderDecl : defnProviderDecls) { providerClass = aDefnProviderDecl.loadClass(); |