diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-26 22:09:55 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-26 22:09:55 +0000 |
commit | 8c8aca83d8a89b2a76b53b4c3398efe1406a1870 (patch) | |
tree | 7ddd39fe17e05fc0eb9bdfaec0dcb8d62004033f /sca-java-2.x/trunk/modules/web-javascript/src/main/java/org/apache/tuscany/sca | |
parent | 736d9f948449d956568d122224278acd1af9b19e (diff) |
Add a test for remote invocations between nodes created from two different node factories
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@916838 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/web-javascript/src/main/java/org/apache/tuscany/sca')
2 files changed, 4 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/modules/web-javascript/src/main/java/org/apache/tuscany/sca/web/javascript/DefaultComponentJavaScriptGeneratorExtensionPoint.java b/sca-java-2.x/trunk/modules/web-javascript/src/main/java/org/apache/tuscany/sca/web/javascript/DefaultComponentJavaScriptGeneratorExtensionPoint.java index 51f243ebcf..55326b539e 100644 --- a/sca-java-2.x/trunk/modules/web-javascript/src/main/java/org/apache/tuscany/sca/web/javascript/DefaultComponentJavaScriptGeneratorExtensionPoint.java +++ b/sca-java-2.x/trunk/modules/web-javascript/src/main/java/org/apache/tuscany/sca/web/javascript/DefaultComponentJavaScriptGeneratorExtensionPoint.java @@ -32,7 +32,6 @@ import javax.xml.namespace.QName; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.extensibility.ServiceDeclaration; -import org.apache.tuscany.sca.extensibility.ServiceDiscovery; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.MonitorFactory; @@ -127,7 +126,7 @@ public class DefaultComponentJavaScriptGeneratorExtensionPoint implements Compon // Get the proxy factories declarations Collection<ServiceDeclaration> factoryDeclarations = null; try { - factoryDeclarations = ServiceDiscovery.getInstance().getServiceDeclarations(ComponentJavaScriptGenerator.class); + factoryDeclarations = extensionPoints.getServiceDiscovery().getServiceDeclarations(ComponentJavaScriptGenerator.class); } catch (IOException e) { IllegalStateException ie = new IllegalStateException(e); error("IllegalStateException", factoryDeclarations, ie); diff --git a/sca-java-2.x/trunk/modules/web-javascript/src/main/java/org/apache/tuscany/sca/web/javascript/DefaultJavascriptProxyFactoryExtensionPoint.java b/sca-java-2.x/trunk/modules/web-javascript/src/main/java/org/apache/tuscany/sca/web/javascript/DefaultJavascriptProxyFactoryExtensionPoint.java index 60f69615ed..402eb53bb0 100644 --- a/sca-java-2.x/trunk/modules/web-javascript/src/main/java/org/apache/tuscany/sca/web/javascript/DefaultJavascriptProxyFactoryExtensionPoint.java +++ b/sca-java-2.x/trunk/modules/web-javascript/src/main/java/org/apache/tuscany/sca/web/javascript/DefaultJavascriptProxyFactoryExtensionPoint.java @@ -45,10 +45,11 @@ public class DefaultJavascriptProxyFactoryExtensionPoint implements JavascriptPr private final Map<Class<?>, JavascriptProxyFactory> factoriesByType = new HashMap<Class<?>, JavascriptProxyFactory>(); private Monitor monitor = null; - + private ExtensionPointRegistry registry; private boolean loaded = false; public DefaultJavascriptProxyFactoryExtensionPoint(ExtensionPointRegistry extensionPoints) { + this.registry = extensionPoints; UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); if (monitorFactory != null) { @@ -116,7 +117,7 @@ public class DefaultJavascriptProxyFactoryExtensionPoint implements JavascriptPr if (bindingType.isInterface()) { // Dynamically load a factory class declared under META-INF/services try { - Class<?> factoryClass = ServiceDiscovery.getInstance().getServiceDeclaration(bindingType).getClass(); + Class<?> factoryClass = registry.getServiceDiscovery().getServiceDeclaration(bindingType).getClass(); if (factoryClass != null) { try { |