diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-01-11 18:04:18 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-01-11 18:04:18 +0000 |
commit | 49b150906d545f9109ca321bcda445f9c998d23a (patch) | |
tree | 693246ffe393369a3130159f883acbfbfcfc2c80 | |
parent | e6467f80ce322c2bb649811df23a7db22b4946d0 (diff) |
Use the servlethost helper to locate the servlet host
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@897972 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | sca-java-2.x/trunk/modules/implementation-web-runtime/src/main/java/org/apache/tuscany/sca/implementation/web/runtime/WebImplementationProviderFactory.java | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-web-runtime/src/main/java/org/apache/tuscany/sca/implementation/web/runtime/WebImplementationProviderFactory.java b/sca-java-2.x/trunk/modules/implementation-web-runtime/src/main/java/org/apache/tuscany/sca/implementation/web/runtime/WebImplementationProviderFactory.java index 468c9a78b8..d020dbe51f 100644 --- a/sca-java-2.x/trunk/modules/implementation-web-runtime/src/main/java/org/apache/tuscany/sca/implementation/web/runtime/WebImplementationProviderFactory.java +++ b/sca-java-2.x/trunk/modules/implementation-web-runtime/src/main/java/org/apache/tuscany/sca/implementation/web/runtime/WebImplementationProviderFactory.java @@ -24,6 +24,7 @@ import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.host.http.DefaultServletHostExtensionPoint; 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.host.webapp.WebAppServletHost; import org.apache.tuscany.sca.implementation.web.WebImplementation; import org.apache.tuscany.sca.interfacedef.Operation; @@ -39,18 +40,7 @@ public class WebImplementationProviderFactory implements ImplementationProviderF private ClientExtensionPoint jsClient; public WebImplementationProviderFactory(ExtensionPointRegistry extensionPoints) { - ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class); - List<ServletHost> hosts = servletHosts.getServletHosts(); - for (ServletHost servletHost : hosts) { - if ("webapp".equals(servletHost.getName())) { - if(servletHost instanceof DefaultServletHostExtensionPoint.LazyServletHost) { - this.servletHost = ((DefaultServletHostExtensionPoint.LazyServletHost) servletHost).getServletHost(); - } else if(servletHost instanceof WebAppServletHost) { - this.servletHost = (WebAppServletHost) servletHost; - } - } - } - + this.servletHost = ServletHostHelper.getServletHost(extensionPoints); jsClient = extensionPoints.getExtensionPoint(ClientExtensionPoint.class); } |