geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1075734 - /geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Date Tue, 01 Mar 2011 09:11:17 GMT
Author: xuhaihong
Date: Tue Mar  1 09:11:17 2011
New Revision: 1075734

URL: http://svn.apache.org/viewvc?rev=1075734&view=rev
Log:
GERONIMO-5841 Only check the servlets configured by users

Modified:
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=1075734&r1=1075733&r2=1075734&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Tue Mar  1 09:11:17 2011
@@ -592,33 +592,35 @@ public class TomcatModuleBuilder extends
                 throw new DeploymentException("Could not load javax.servlet.Servlet in bundle
" + bundle, e);
             }
 
-            for (ServletInfo servletInfo : webAppInfo.servlets) {
+            for (org.apache.openejb.jee.Servlet servlet : webApp.getServlet()) {
+                String servletName = servlet.getServletName();
+                String servletClassName = servlet.getServletClass();
                 Class<?> servletClass;
                 try {
-                    servletClass = webBundle.loadClass(servletInfo.servletClass);
+                    servletClass = webBundle.loadClass(servletClassName);
                 } catch (ClassNotFoundException e) {
-                    throw new DeploymentException("Could not load servlet class " + servletInfo.servletClass
+ " from bundle " + bundle, e);
+                    throw new DeploymentException("Could not load servlet class " + servletClassName,
e);
                 }
                 if (!baseServletClass.isAssignableFrom(servletClass)) {
                     //fake servletData
-                    AbstractName servletAbstractName = moduleContext.getNaming().createChildName(moduleName,
servletInfo.servletName, NameFactory.SERVLET);
+                    AbstractName servletAbstractName = moduleContext.getNaming().createChildName(moduleName,
servletName, NameFactory.SERVLET);
                     GBeanData servletData = new GBeanData();
                     servletData.setAbstractName(servletAbstractName);
                     //let the web service builder deal with configuring the gbean with the
web service stack
                     //Here we just extract the factory reference
                     boolean configured = false;
                     for (WebServiceBuilder serviceBuilder : webServiceBuilder) {
-                        if (serviceBuilder.configurePOJO(servletData, servletInfo.servletName,
module, servletInfo.servletClass, moduleContext)) {
+                        if (serviceBuilder.configurePOJO(servletData, servletName, module,
servletClassName, moduleContext)) {
                             configured = true;
                             break;
                         }
                     }
                     if (!configured) {
-                        throw new DeploymentException("POJO web service: " + servletInfo.servletName
+ " not configured by any web service builder");
+                        throw new DeploymentException("POJO web service: " + servletName
+ " not configured by any web service builder");
                     }
                     ReferencePatterns patterns = servletData.getReferencePatterns("WebServiceContainerFactory");
                     AbstractName wsContainerFactoryName = patterns.getAbstractName();
-                    webServices.put(servletInfo.servletName, wsContainerFactoryName);
+                    webServices.put(servletName, wsContainerFactoryName);
                     //force all the factories to start before the web app that needs them.
                     webModuleData.addDependency(wsContainerFactoryName);
                 }



Mime
View raw message