geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwo...@apache.org
Subject svn commit: r1060665 - /geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Date Wed, 19 Jan 2011 03:08:11 GMT
Author: rwonly
Date: Wed Jan 19 03:08:10 2011
New Revision: 1060665

URL: http://svn.apache.org/viewvc?rev=1060665&view=rev
Log:
revert the changes in 1060171, and will try a new approach.

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=1060665&r1=1060664&r2=1060665&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
Wed Jan 19 03:08:10 2011
@@ -52,7 +52,6 @@ import org.apache.geronimo.gbean.Abstrac
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
-import org.apache.geronimo.gbean.ReferencePatterns;
 import org.apache.geronimo.gbean.annotation.GBean;
 import org.apache.geronimo.gbean.annotation.ParamAttribute;
 import org.apache.geronimo.gbean.annotation.ParamReference;
@@ -582,7 +581,7 @@ public class TomcatModuleBuilder extends
 
             webModuleData.setAttribute("contextAttributes", contextAttributes);
 
-            //Handle webservices and the role permissions on the servlets.
+            //Handle the role permissions and webservices on the servlets.
             List<org.apache.openejb.jee.Servlet> servletTypes = webApp.getServlet();
             Map<String, AbstractName> webServices = new HashMap<String, AbstractName>();
             Class<?> baseServletClass;
@@ -591,46 +590,43 @@ public class TomcatModuleBuilder extends
             } catch (ClassNotFoundException e) {
                 throw new DeploymentException("Could not load javax.servlet.Servlet in bundle
" + bundle, e);
             }
-            
-            
-            // web services fake servlet 
-            for (org.apache.openejb.jee.Servlet servletType : servletTypes) {
-
-                if (servletType.getServletClass() != null) {
-                    String servletName = servletType.getServletName().trim();
-                    String servletClassName = servletType.getServletClass().trim();
-                    Class servletClass;
-                    try {
-                        servletClass = webBundle.loadClass(servletClassName);
-                    } catch (ClassNotFoundException e) {
-                        throw new DeploymentException("Could not load servlet class " + servletClassName
+ " from bundle " + bundle, e);
-                    }
-                    if (!baseServletClass.isAssignableFrom(servletClass)) {
-                        //fake servletData
-                        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, servletName, module,
servletClassName, moduleContext)) {
-                                configured = true;
-                                break;
-                            }
-                        }
-                        if (!configured) {
-                            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(servletName, wsContainerFactoryName);
-                        //force all the factories to start before the web app that needs
them.
-                        webModuleData.addDependency(wsContainerFactoryName);
-                    }
-
-                }
-            }
+//            for (org.apache.openejb.jee.Servlet servletType : servletTypes) {
+//
+//                if (servletType.getServletClass() != null) {
+//                    String servletName = servletType.getServletName().trim();
+//                    String servletClassName = servletType.getServletClass().trim();
+//                    Class servletClass;
+//                    try {
+//                        servletClass = webBundle.loadClass(servletClassName);
+//                    } catch (ClassNotFoundException e) {
+//                        throw new DeploymentException("Could not load servlet class " +
servletClassName + " from bundle " + bundle, e);
+//                    }
+//                    if (!baseServletClass.isAssignableFrom(servletClass)) {
+//                        //fake servletData
+//                        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, servletName,
module, servletClassName, moduleContext)) {
+//                                configured = true;
+//                                break;
+//                            }
+//                        }
+//                        if (!configured) {
+//                            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(servletName, wsContainerFactoryName);
+//                        //force all the factories to start before the web app that needs
them.
+//                        webModuleData.addDependency(wsContainerFactoryName);
+//                    }
+//
+//                }
+//            }
 
 
             webModuleData.setAttribute("webServices", webServices);



Mime
View raw message