diff options
Diffstat (limited to '')
-rw-r--r-- | branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/DefaultContextFactoryExtensionPoint.java | 6 |
1 files changed, 4 insertions, 2 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); |