You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2010/01/11 19:04:18 UTC
svn commit: r897972 -
/tuscany/sca-java-2.x/trunk/modules/implementation-web-runtime/src/main/java/org/apache/tuscany/sca/implementation/web/runtime/WebImplementationProviderFactory.java
Author: antelder
Date: Mon Jan 11 18:04:18 2010
New Revision: 897972
URL: http://svn.apache.org/viewvc?rev=897972&view=rev
Log:
Use the servlethost helper to locate the servlet host
Modified:
tuscany/sca-java-2.x/trunk/modules/implementation-web-runtime/src/main/java/org/apache/tuscany/sca/implementation/web/runtime/WebImplementationProviderFactory.java
Modified: tuscany/sca-java-2.x/trunk/modules/implementation-web-runtime/src/main/java/org/apache/tuscany/sca/implementation/web/runtime/WebImplementationProviderFactory.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-web-runtime/src/main/java/org/apache/tuscany/sca/implementation/web/runtime/WebImplementationProviderFactory.java?rev=897972&r1=897971&r2=897972&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/implementation-web-runtime/src/main/java/org/apache/tuscany/sca/implementation/web/runtime/WebImplementationProviderFactory.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/implementation-web-runtime/src/main/java/org/apache/tuscany/sca/implementation/web/runtime/WebImplementationProviderFactory.java Mon Jan 11 18:04:18 2010
@@ -24,6 +24,7 @@
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 @@
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);
}