summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/core-spi
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-28 19:29:50 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-28 19:29:50 +0000
commit3ab338ad0b521192e72a4e1da2e6fae0f45b38ae (patch)
tree14b6aab8959c1e79b4578a1617966c96cf329a45 /java/sca/modules/core-spi
parentc13b16cafe0cd2999754186270f6b8e03baefe6d (diff)
Pass ServiceRegistry via extensionPointRegistry to remove static references
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@830738 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/core-spi')
-rw-r--r--java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/DefaultContextFactoryExtensionPoint.java2
-rw-r--r--java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultProviderFactoryExtensionPoint.java2
-rw-r--r--java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DefaultWireProcessorExtensionPoint.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/DefaultContextFactoryExtensionPoint.java b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/DefaultContextFactoryExtensionPoint.java
index 3c4be9cd55..c079a9dc66 100644
--- a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/DefaultContextFactoryExtensionPoint.java
+++ b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/DefaultContextFactoryExtensionPoint.java
@@ -94,7 +94,7 @@ public class DefaultContextFactoryExtensionPoint implements ContextFactoryExtens
// Dynamically load a factory class declared under META-INF/services
try {
- ServiceDeclaration factoryDeclaration = ServiceDiscovery.getInstance().getServiceDeclaration(factoryInterface.getName());
+ ServiceDeclaration factoryDeclaration = registry.getServiceDiscovery().getServiceDeclaration(factoryInterface.getName());
if (factoryDeclaration != null) {
Class<?> factoryClass = factoryDeclaration.loadClass();
diff --git a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultProviderFactoryExtensionPoint.java b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultProviderFactoryExtensionPoint.java
index 61af242182..2ee058a14d 100644
--- a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultProviderFactoryExtensionPoint.java
+++ b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultProviderFactoryExtensionPoint.java
@@ -131,7 +131,7 @@ public class DefaultProviderFactoryExtensionPoint implements ProviderFactoryExte
// Get the provider factory service declarations
Collection<ServiceDeclaration> factoryDeclarations;
- ServiceDiscovery serviceDiscovery = ServiceDiscovery.getInstance();
+ ServiceDiscovery serviceDiscovery = registry.getServiceDiscovery();
try {
factoryDeclarations = serviceDiscovery.getServiceDeclarations(factoryClass.getName(), true);
} catch (Exception e) {
diff --git a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DefaultWireProcessorExtensionPoint.java b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DefaultWireProcessorExtensionPoint.java
index 9f28f7650a..283d1d1a8b 100644
--- a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DefaultWireProcessorExtensionPoint.java
+++ b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DefaultWireProcessorExtensionPoint.java
@@ -90,7 +90,7 @@ public class DefaultWireProcessorExtensionPoint implements RuntimeWireProcessorE
}
try {
Collection<ServiceDeclaration> sds =
- ServiceDiscovery.getInstance().getServiceDeclarations(RuntimeWireProcessor.class, true);
+ registry.getServiceDiscovery().getServiceDeclarations(RuntimeWireProcessor.class, true);
for (ServiceDeclaration sd : sds) {
Class type = sd.loadClass();
Constructor constructor = null;