From cc609c405281d171cc71a5494219c25e3655c241 Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 11 Jan 2010 18:06:41 +0000 Subject: Use the servlethost helper to locate the servlet host git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@897976 13f79535-47bb-0310-9956-ffa450edef68 --- .../implementation/web/client/JSClientExtensionPointImpl.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'sca-java-2.x/trunk/modules/implementation-web-client/src/main/java') diff --git a/sca-java-2.x/trunk/modules/implementation-web-client/src/main/java/org/apache/tuscany/sca/implementation/web/client/JSClientExtensionPointImpl.java b/sca-java-2.x/trunk/modules/implementation-web-client/src/main/java/org/apache/tuscany/sca/implementation/web/client/JSClientExtensionPointImpl.java index bb5e68b950..e57d751048 100644 --- a/sca-java-2.x/trunk/modules/implementation-web-client/src/main/java/org/apache/tuscany/sca/implementation/web/client/JSClientExtensionPointImpl.java +++ b/sca-java-2.x/trunk/modules/implementation-web-client/src/main/java/org/apache/tuscany/sca/implementation/web/client/JSClientExtensionPointImpl.java @@ -19,12 +19,10 @@ package org.apache.tuscany.sca.implementation.web.client; -import java.util.List; - import org.apache.tuscany.sca.assembly.ComponentReference; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.host.http.ServletHost; -import org.apache.tuscany.sca.host.http.ServletHostExtensionPoint; +import org.apache.tuscany.sca.host.http.ServletHostHelper; import org.apache.tuscany.sca.implementation.web.WebImplementation; import org.apache.tuscany.sca.implementation.web.runtime.ClientExtensionPoint; import org.apache.tuscany.sca.interfacedef.Operation; @@ -38,11 +36,7 @@ public class JSClientExtensionPointImpl implements ClientExtensionPoint { private ServletHost servletHost; public JSClientExtensionPointImpl(ExtensionPointRegistry extensionPoints) { - ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class); - List hosts = servletHosts.getServletHosts(); - if (!hosts.isEmpty()) { - this.servletHost = hosts.get(0); - } + this.servletHost = ServletHostHelper.getServletHost(extensionPoints); } public ImplementationProvider createImplementationProvider(RuntimeComponent component, WebImplementation implementation) { -- cgit v1.2.3