geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r966967 [2/2] - in /geronimo/external/branches/tomcat-parent-6.0.29: catalina/src/main/java/org/apache/catalina/core/ catalina/src/main/java/org/apache/catalina/deploy/ catalina/src/main/java/org/apache/catalina/servlets/ catalina/src/main/...
Date Fri, 23 Jul 2010 05:20:01 GMT
Modified: geronimo/external/branches/tomcat-parent-6.0.29/catalina/src/main/java/org/apache/catalina/startup/WebRuleSet.java
URL: http://svn.apache.org/viewvc/geronimo/external/branches/tomcat-parent-6.0.29/catalina/src/main/java/org/apache/catalina/startup/WebRuleSet.java?rev=966967&r1=966966&r2=966967&view=diff
==============================================================================
--- geronimo/external/branches/tomcat-parent-6.0.29/catalina/src/main/java/org/apache/catalina/startup/WebRuleSet.java (original)
+++ geronimo/external/branches/tomcat-parent-6.0.29/catalina/src/main/java/org/apache/catalina/startup/WebRuleSet.java Fri Jul 23 05:20:00 2010
@@ -139,58 +139,7 @@ public class WebRuleSet extends RuleSetB
         digester.addRule(prefix + "web-app/distributable",
                          new SetDistributableRule());
 
-        digester.addObjectCreate(prefix + "web-app/ejb-local-ref",
-                                 "org.apache.catalina.deploy.ContextLocalEjb");
-        digester.addRule(prefix + "web-app/ejb-local-ref",
-                new SetNextNamingRule("addLocalEjb",
-                            "org.apache.catalina.deploy.ContextLocalEjb"));
-
-        digester.addCallMethod(prefix + "web-app/ejb-local-ref/description",
-                               "setDescription", 0);
-        digester.addCallMethod(prefix + "web-app/ejb-local-ref/ejb-link",
-                               "setLink", 0);
-        digester.addCallMethod(prefix + "web-app/ejb-local-ref/ejb-ref-name",
-                               "setName", 0);
-        digester.addCallMethod(prefix + "web-app/ejb-local-ref/ejb-ref-type",
-                               "setType", 0);
-        digester.addCallMethod(prefix + "web-app/ejb-local-ref/local",
-                               "setLocal", 0);
-        digester.addCallMethod(prefix + "web-app/ejb-local-ref/local-home",
-                               "setHome", 0);
-
-        digester.addObjectCreate(prefix + "web-app/ejb-ref",
-                                 "org.apache.catalina.deploy.ContextEjb");
-        digester.addRule(prefix + "web-app/ejb-ref",
-                new SetNextNamingRule("addEjb",
-                            "org.apache.catalina.deploy.ContextEjb"));
-
-        digester.addCallMethod(prefix + "web-app/ejb-ref/description",
-                               "setDescription", 0);
-        digester.addCallMethod(prefix + "web-app/ejb-ref/ejb-link",
-                               "setLink", 0);
-        digester.addCallMethod(prefix + "web-app/ejb-ref/ejb-ref-name",
-                               "setName", 0);
-        digester.addCallMethod(prefix + "web-app/ejb-ref/ejb-ref-type",
-                               "setType", 0);
-        digester.addCallMethod(prefix + "web-app/ejb-ref/home",
-                               "setHome", 0);
-        digester.addCallMethod(prefix + "web-app/ejb-ref/remote",
-                               "setRemote", 0);
-
-        digester.addObjectCreate(prefix + "web-app/env-entry",
-                                 "org.apache.catalina.deploy.ContextEnvironment");
-        digester.addRule(prefix + "web-app/env-entry",
-                new SetNextNamingRule("addEnvironment",
-                            "org.apache.catalina.deploy.ContextEnvironment"));
-
-        digester.addCallMethod(prefix + "web-app/env-entry/description",
-                               "setDescription", 0);
-        digester.addCallMethod(prefix + "web-app/env-entry/env-entry-name",
-                               "setName", 0);
-        digester.addCallMethod(prefix + "web-app/env-entry/env-entry-type",
-                               "setType", 0);
-        digester.addCallMethod(prefix + "web-app/env-entry/env-entry-value",
-                               "setValue", 0);
+        configureNamingRules(digester);
 
         digester.addObjectCreate(prefix + "web-app/error-page",
                                  "org.apache.catalina.deploy.ErrorPage");
@@ -279,6 +228,160 @@ public class WebRuleSet extends RuleSetB
         digester.addCallParam(prefix + "web-app/mime-mapping/extension", 0);
         digester.addCallParam(prefix + "web-app/mime-mapping/mime-type", 1);
 
+
+        digester.addObjectCreate(prefix + "web-app/security-constraint",
+                                 "org.apache.catalina.deploy.SecurityConstraint");
+        digester.addSetNext(prefix + "web-app/security-constraint",
+                            "addConstraint",
+                            "org.apache.catalina.deploy.SecurityConstraint");
+
+        digester.addRule(prefix + "web-app/security-constraint/auth-constraint",
+                         new SetAuthConstraintRule());
+        digester.addCallMethod(prefix + "web-app/security-constraint/auth-constraint/role-name",
+                               "addAuthRole", 0);
+        digester.addCallMethod(prefix + "web-app/security-constraint/display-name",
+                               "setDisplayName", 0);
+        digester.addCallMethod(prefix + "web-app/security-constraint/user-data-constraint/transport-guarantee",
+                               "setUserConstraint", 0);
+
+        digester.addObjectCreate(prefix + "web-app/security-constraint/web-resource-collection",
+                                 "org.apache.catalina.deploy.SecurityCollection");
+        digester.addSetNext(prefix + "web-app/security-constraint/web-resource-collection",
+                            "addCollection",
+                            "org.apache.catalina.deploy.SecurityCollection");
+        digester.addCallMethod(prefix + "web-app/security-constraint/web-resource-collection/http-method",
+                               "addMethod", 0);
+        digester.addCallMethod(prefix + "web-app/security-constraint/web-resource-collection/url-pattern",
+                               "addPattern", 0);
+        digester.addCallMethod(prefix + "web-app/security-constraint/web-resource-collection/web-resource-name",
+                               "setName", 0);
+
+        digester.addCallMethod(prefix + "web-app/security-role/role-name",
+                               "addSecurityRole", 0);
+
+        digester.addRule(prefix + "web-app/servlet",
+                         new WrapperCreateRule());
+        digester.addSetNext(prefix + "web-app/servlet",
+                            "addChild",
+                            "org.apache.catalina.Container");
+
+        digester.addCallMethod(prefix + "web-app/servlet/init-param",
+                               "addInitParameter", 2);
+        digester.addCallParam(prefix + "web-app/servlet/init-param/param-name",
+                              0);
+        digester.addCallParam(prefix + "web-app/servlet/init-param/param-value",
+                              1);
+
+        digester.addCallMethod(prefix + "web-app/servlet/jsp-file",
+                               "setJspFile", 0);
+        digester.addCallMethod(prefix + "web-app/servlet/load-on-startup",
+                               "setLoadOnStartupString", 0);
+        digester.addCallMethod(prefix + "web-app/servlet/run-as/role-name",
+                               "setRunAs", 0);
+
+        digester.addRule(prefix + "web-app/servlet/security-role-ref",
+                new SecurityRoleRefCreateRule());
+        digester.addCallMethod(
+                prefix + "web-app/servlet/security-role-ref/role-link",
+                "setLink", 0);
+        digester.addCallMethod(
+                prefix + "web-app/servlet/security-role-ref/role-name",
+                "setName", 0);
+
+        digester.addCallMethod(prefix + "web-app/servlet/servlet-class",
+                              "setServletClass", 0);
+        digester.addCallMethod(prefix + "web-app/servlet/servlet-name",
+                              "setName", 0);
+
+        digester.addRule(prefix + "web-app/servlet-mapping",
+                               new CallMethodMultiRule("addServletMapping", 2, 0));
+        digester.addCallParam(prefix + "web-app/servlet-mapping/servlet-name", 1);
+        digester.addRule(prefix + "web-app/servlet-mapping/url-pattern", new CallParamMultiRule(0));
+
+        digester.addRule(prefix + "web-app/session-config",
+                         sessionConfig);
+        
+        digester.addCallMethod(prefix + "web-app/session-config/session-timeout",
+                               "setSessionTimeout", 1,
+                               new Class[] { Integer.TYPE });
+        digester.addCallParam(prefix + "web-app/session-config/session-timeout", 0);
+
+        digester.addCallMethod(prefix + "web-app/taglib",
+                               "addTaglib", 2);
+        digester.addCallParam(prefix + "web-app/taglib/taglib-location", 1);
+        digester.addCallParam(prefix + "web-app/taglib/taglib-uri", 0);
+
+        digester.addCallMethod(prefix + "web-app/welcome-file-list/welcome-file",
+                               "addWelcomeFile", 0);
+
+        digester.addCallMethod(prefix + "web-app/locale-encoding-mapping-list/locale-encoding-mapping",
+                              "addLocaleEncodingMappingParameter", 2);
+        digester.addCallParam(prefix + "web-app/locale-encoding-mapping-list/locale-encoding-mapping/locale", 0);
+        digester.addCallParam(prefix + "web-app/locale-encoding-mapping-list/locale-encoding-mapping/encoding", 1);
+
+    }
+
+    protected void configureNamingRules(Digester digester) {
+        //ejb-local-ref
+        digester.addObjectCreate(prefix + "web-app/ejb-local-ref",
+                                 "org.apache.catalina.deploy.ContextLocalEjb");
+        digester.addRule(prefix + "web-app/ejb-local-ref",
+                new SetNextNamingRule("addLocalEjb",
+                            "org.apache.catalina.deploy.ContextLocalEjb"));
+
+        digester.addCallMethod(prefix + "web-app/ejb-local-ref/description",
+                               "setDescription", 0);
+        digester.addCallMethod(prefix + "web-app/ejb-local-ref/ejb-link",
+                               "setLink", 0);
+        digester.addCallMethod(prefix + "web-app/ejb-local-ref/ejb-ref-name",
+                               "setName", 0);
+        digester.addCallMethod(prefix + "web-app/ejb-local-ref/ejb-ref-type",
+                               "setType", 0);
+        digester.addCallMethod(prefix + "web-app/ejb-local-ref/local",
+                               "setLocal", 0);
+        digester.addCallMethod(prefix + "web-app/ejb-local-ref/local-home",
+                               "setHome", 0);
+        configureInjectionRules(digester, "web-app/ejb-local-ref/");
+
+        //ejb-ref
+        digester.addObjectCreate(prefix + "web-app/ejb-ref",
+                                 "org.apache.catalina.deploy.ContextEjb");
+        digester.addRule(prefix + "web-app/ejb-ref",
+                new SetNextNamingRule("addEjb",
+                            "org.apache.catalina.deploy.ContextEjb"));
+
+        digester.addCallMethod(prefix + "web-app/ejb-ref/description",
+                               "setDescription", 0);
+        digester.addCallMethod(prefix + "web-app/ejb-ref/ejb-link",
+                               "setLink", 0);
+        digester.addCallMethod(prefix + "web-app/ejb-ref/ejb-ref-name",
+                               "setName", 0);
+        digester.addCallMethod(prefix + "web-app/ejb-ref/ejb-ref-type",
+                               "setType", 0);
+        digester.addCallMethod(prefix + "web-app/ejb-ref/home",
+                               "setHome", 0);
+        digester.addCallMethod(prefix + "web-app/ejb-ref/remote",
+                               "setRemote", 0);
+        configureInjectionRules(digester, "web-app/ejb-ref/");
+
+        //env-entry
+        digester.addObjectCreate(prefix + "web-app/env-entry",
+                                 "org.apache.catalina.deploy.ContextEnvironment");
+        digester.addRule(prefix + "web-app/env-entry",
+                new SetNextNamingRule("addEnvironment",
+                            "org.apache.catalina.deploy.ContextEnvironment"));
+
+        digester.addCallMethod(prefix + "web-app/env-entry/description",
+                               "setDescription", 0);
+        digester.addCallMethod(prefix + "web-app/env-entry/env-entry-name",
+                               "setName", 0);
+        digester.addCallMethod(prefix + "web-app/env-entry/env-entry-type",
+                               "setType", 0);
+        digester.addCallMethod(prefix + "web-app/env-entry/env-entry-value",
+                               "setValue", 0);
+        configureInjectionRules(digester, "web-app/env-entry/");
+
+        //resource-env-ref
         digester.addObjectCreate(prefix + "web-app/resource-env-ref",
             "org.apache.catalina.deploy.ContextResourceEnvRef");
         digester.addRule(prefix + "web-app/resource-env-ref",
@@ -289,7 +392,9 @@ public class WebRuleSet extends RuleSetB
                 "setName", 0);
         digester.addCallMethod(prefix + "web-app/resource-env-ref/resource-env-ref-type",
                 "setType", 0);
+        configureInjectionRules(digester, "web-app/ejb-local-ref/");
 
+        //message-destination
         digester.addObjectCreate(prefix + "web-app/message-destination",
                                  "org.apache.catalina.deploy.MessageDestination");
         digester.addSetNext(prefix + "web-app/message-destination",
@@ -307,6 +412,7 @@ public class WebRuleSet extends RuleSetB
         digester.addCallMethod(prefix + "web-app/message-destination/message-destination-name",
                                "setName", 0);
 
+        //message-destination-ref
         digester.addObjectCreate(prefix + "web-app/message-destination-ref",
                                  "org.apache.catalina.deploy.MessageDestinationRef");
         digester.addSetNext(prefix + "web-app/message-destination-ref",
@@ -324,6 +430,9 @@ public class WebRuleSet extends RuleSetB
         digester.addCallMethod(prefix + "web-app/message-destination-ref/message-destination-usage",
                                "setUsage", 0);
 
+        configureInjectionRules(digester, "web-app/message-destination-ref/");
+
+        //resource-ref
         digester.addObjectCreate(prefix + "web-app/resource-ref",
                                  "org.apache.catalina.deploy.ContextResource");
         digester.addRule(prefix + "web-app/resource-ref",
@@ -340,37 +449,9 @@ public class WebRuleSet extends RuleSetB
                                "setScope", 0);
         digester.addCallMethod(prefix + "web-app/resource-ref/res-type",
                                "setType", 0);
+        configureInjectionRules(digester, "web-app/resource-ref/");
 
-        digester.addObjectCreate(prefix + "web-app/security-constraint",
-                                 "org.apache.catalina.deploy.SecurityConstraint");
-        digester.addSetNext(prefix + "web-app/security-constraint",
-                            "addConstraint",
-                            "org.apache.catalina.deploy.SecurityConstraint");
-
-        digester.addRule(prefix + "web-app/security-constraint/auth-constraint",
-                         new SetAuthConstraintRule());
-        digester.addCallMethod(prefix + "web-app/security-constraint/auth-constraint/role-name",
-                               "addAuthRole", 0);
-        digester.addCallMethod(prefix + "web-app/security-constraint/display-name",
-                               "setDisplayName", 0);
-        digester.addCallMethod(prefix + "web-app/security-constraint/user-data-constraint/transport-guarantee",
-                               "setUserConstraint", 0);
-
-        digester.addObjectCreate(prefix + "web-app/security-constraint/web-resource-collection",
-                                 "org.apache.catalina.deploy.SecurityCollection");
-        digester.addSetNext(prefix + "web-app/security-constraint/web-resource-collection",
-                            "addCollection",
-                            "org.apache.catalina.deploy.SecurityCollection");
-        digester.addCallMethod(prefix + "web-app/security-constraint/web-resource-collection/http-method",
-                               "addMethod", 0);
-        digester.addCallMethod(prefix + "web-app/security-constraint/web-resource-collection/url-pattern",
-                               "addPattern", 0);
-        digester.addCallMethod(prefix + "web-app/security-constraint/web-resource-collection/web-resource-name",
-                               "setName", 0);
-
-        digester.addCallMethod(prefix + "web-app/security-role/role-name",
-                               "addSecurityRole", 0);
-
+        //service-ref
         digester.addObjectCreate(prefix + "web-app/service-ref",
                                  "org.apache.catalina.deploy.ContextService");
         digester.addRule(prefix + "web-app/service-ref",
@@ -403,7 +484,7 @@ public class WebRuleSet extends RuleSetB
         digester.addRule(prefix + "web-app/service-ref/handler",
                          new SetNextRule("addHandler",
                          "org.apache.catalina.deploy.ContextHandler"));
-        
+
         digester.addCallMethod(prefix + "web-app/service-ref/handler/handler-name",
                                "setName", 0);
         digester.addCallMethod(prefix + "web-app/service-ref/handler/handler-class",
@@ -422,69 +503,20 @@ public class WebRuleSet extends RuleSetB
                                "addSoapRole", 0);
         digester.addCallMethod(prefix + "web-app/service-ref/handler/port-name",
                                "addPortName", 0);
-        
-        digester.addRule(prefix + "web-app/servlet",
-                         new WrapperCreateRule());
-        digester.addSetNext(prefix + "web-app/servlet",
-                            "addChild",
-                            "org.apache.catalina.Container");
-
-        digester.addCallMethod(prefix + "web-app/servlet/init-param",
-                               "addInitParameter", 2);
-        digester.addCallParam(prefix + "web-app/servlet/init-param/param-name",
-                              0);
-        digester.addCallParam(prefix + "web-app/servlet/init-param/param-value",
-                              1);
-
-        digester.addCallMethod(prefix + "web-app/servlet/jsp-file",
-                               "setJspFile", 0);
-        digester.addCallMethod(prefix + "web-app/servlet/load-on-startup",
-                               "setLoadOnStartupString", 0);
-        digester.addCallMethod(prefix + "web-app/servlet/run-as/role-name",
-                               "setRunAs", 0);
-
-        digester.addRule(prefix + "web-app/servlet/security-role-ref",
-                new SecurityRoleRefCreateRule());
-        digester.addCallMethod(
-                prefix + "web-app/servlet/security-role-ref/role-link",
-                "setLink", 0);
-        digester.addCallMethod(
-                prefix + "web-app/servlet/security-role-ref/role-name",
-                "setName", 0);
-
-        digester.addCallMethod(prefix + "web-app/servlet/servlet-class",
-                              "setServletClass", 0);
-        digester.addCallMethod(prefix + "web-app/servlet/servlet-name",
-                              "setName", 0);
+        configureInjectionRules(digester, "web-app/service-ref/");
 
-        digester.addRule(prefix + "web-app/servlet-mapping",
-                               new CallMethodMultiRule("addServletMapping", 2, 0));
-        digester.addCallParam(prefix + "web-app/servlet-mapping/servlet-name", 1);
-        digester.addRule(prefix + "web-app/servlet-mapping/url-pattern", new CallParamMultiRule(0));
-
-        digester.addRule(prefix + "web-app/session-config",
-                         sessionConfig);
-        
-        digester.addCallMethod(prefix + "web-app/session-config/session-timeout",
-                               "setSessionTimeout", 1,
-                               new Class[] { Integer.TYPE });
-        digester.addCallParam(prefix + "web-app/session-config/session-timeout", 0);
 
-        digester.addCallMethod(prefix + "web-app/taglib",
-                               "addTaglib", 2);
-        digester.addCallParam(prefix + "web-app/taglib/taglib-location", 1);
-        digester.addCallParam(prefix + "web-app/taglib/taglib-uri", 0);
+    }
 
-        digester.addCallMethod(prefix + "web-app/welcome-file-list/welcome-file",
-                               "addWelcomeFile", 0);
+    protected void configureInjectionRules(Digester digester, String base) {
 
-        digester.addCallMethod(prefix + "web-app/locale-encoding-mapping-list/locale-encoding-mapping",
-                              "addLocaleEncodingMappingParameter", 2);
-        digester.addCallParam(prefix + "web-app/locale-encoding-mapping-list/locale-encoding-mapping/locale", 0);
-        digester.addCallParam(prefix + "web-app/locale-encoding-mapping-list/locale-encoding-mapping/encoding", 1);
+        digester.addCallMethod(prefix + base + "injection-target", "addInjectionTarget", 2);
+        digester.addCallParam(prefix + base + "injection-target/injection-target-class", 0);
+        digester.addCallParam(prefix + base + "injection-target/injection-target-name", 1);
 
     }
 
+
     /**
      * Reset counter used for validating the web.xml file.
      */

Modified: geronimo/external/branches/tomcat-parent-6.0.29/catalina/src/main/resources/org/apache/catalina/core/LocalStrings.properties
URL: http://svn.apache.org/viewvc/geronimo/external/branches/tomcat-parent-6.0.29/catalina/src/main/resources/org/apache/catalina/core/LocalStrings.properties?rev=966967&r1=966966&r2=966967&view=diff
==============================================================================
--- geronimo/external/branches/tomcat-parent-6.0.29/catalina/src/main/resources/org/apache/catalina/core/LocalStrings.properties (original)
+++ geronimo/external/branches/tomcat-parent-6.0.29/catalina/src/main/resources/org/apache/catalina/core/LocalStrings.properties Fri Jul 23 05:20:00 2010
@@ -209,7 +209,6 @@ standardWrapper.notClass=No servlet clas
 standardWrapper.notContext=Parent container of a Wrapper must be a Context
 standardWrapper.notFound=Servlet {0} is not available
 standardWrapper.notServlet=Class {0} is not a Servlet
-standardWrapper.privilegedServlet=Servlet of class {0} is privileged and cannot be loaded by this web application
 standardWrapper.releaseFilters=Release filters exception for servlet {0}
 standardWrapper.serviceException=Servlet.service() for servlet {0} threw exception
 standardWrapper.statusHeader=HTTP Status {0} - {1}
@@ -218,7 +217,9 @@ standardWrapper.unavailable=Marking serv
 standardWrapper.unloadException=Servlet {0} threw unload() exception
 standardWrapper.unloading=Cannot allocate servlet {0} because it is being unloaded
 standardWrapper.waiting=Waiting for {0} instance(s) to be deallocated
-standardWrapper.restrictedServletsResource=Restricted servlets property file not found
 
-applicationFilterConfig.restrictedFiltersResource=Restricted filters property file not found
-applicationFilterConfig.privilegedFilter=Filter of class {0} is privileged and cannot be loaded by this web application
+defaultInstanceManager.restrictedServletsResource=Restricted servlets property file not found
+defaultInstanceManager.privilegedServlet=Servlet of class {0} is privileged and cannot be loaded by this web application
+defaultInstanceManager.restrictedFiltersResource=Restricted filters property file not found
+defaultInstanceManager.privilegedFilter=Filter of class {0} is privileged and cannot be loaded by this web application
+defaultInstanceManager.restrictedListenersResources="Restricted listeners property file not found
\ No newline at end of file

Modified: geronimo/external/branches/tomcat-parent-6.0.29/catalina/src/main/resources/org/apache/catalina/core/mbeans-descriptors.xml
URL: http://svn.apache.org/viewvc/geronimo/external/branches/tomcat-parent-6.0.29/catalina/src/main/resources/org/apache/catalina/core/mbeans-descriptors.xml?rev=966967&r1=966966&r2=966967&view=diff
==============================================================================
--- geronimo/external/branches/tomcat-parent-6.0.29/catalina/src/main/resources/org/apache/catalina/core/mbeans-descriptors.xml (original)
+++ geronimo/external/branches/tomcat-parent-6.0.29/catalina/src/main/resources/org/apache/catalina/core/mbeans-descriptors.xml Fri Jul 23 05:20:00 2010
@@ -64,9 +64,9 @@
                is="true"
                type="boolean"/>
       
-     <attribute name="annotationProcessor"
-                description="Object that processes things like injection annotations"
-                type="org.apache.AnnotationProcessor" />
+    <attribute name="instanceManager"
+                description="Object that creates and destroys servlets, filters, and listeners. Include dependency injection and postConstruct/preDestory handling"
+                type="org.apache.catalina.instanceManagement.InstanceManager" />
 
     <attribute name="antiJARLocking"
                description="Take care to not lock jar files"

Modified: geronimo/external/branches/tomcat-parent-6.0.29/catalina/src/main/resources/org/apache/catalina/servlets/LocalStrings.properties
URL: http://svn.apache.org/viewvc/geronimo/external/branches/tomcat-parent-6.0.29/catalina/src/main/resources/org/apache/catalina/servlets/LocalStrings.properties?rev=966967&r1=966966&r2=966967&view=diff
==============================================================================
--- geronimo/external/branches/tomcat-parent-6.0.29/catalina/src/main/resources/org/apache/catalina/servlets/LocalStrings.properties (original)
+++ geronimo/external/branches/tomcat-parent-6.0.29/catalina/src/main/resources/org/apache/catalina/servlets/LocalStrings.properties Fri Jul 23 05:20:00 2010
@@ -25,7 +25,6 @@ invokerServlet.invalidPath=No servlet na
 invokerServlet.notNamed=Cannot call invoker servlet with a named dispatcher
 invokerServlet.noWrapper=Container has not called setWrapper() for this servlet
 webdavservlet.jaxpfailed=JAXP initialization failed
-webdavservlet.enternalEntityIgnored=The request included a reference to an external entity with PublicID {0} and SystemID {1} which was ignored
 directory.filename=Filename
 directory.lastModified=Last Modified
 directory.parent=Up To {0}

Modified: geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/Constants.java
URL: http://svn.apache.org/viewvc/geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/Constants.java?rev=966967&r1=966966&r2=966967&view=diff
==============================================================================
--- geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/Constants.java (original)
+++ geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/Constants.java Fri Jul 23 05:20:00 2010
@@ -205,4 +205,7 @@ public class Constants {
         System.getProperty("org.apache.catalina.SESSION_PARAMETER_NAME",
                 "jsessionid");
 
+    public static final boolean USE_INSTANCE_MANAGER_FOR_TAGS =
+        Boolean.valueOf(System.getProperty("org.apache.jasper.Constants.USE_INSTANCE_MANAGER_FOR_TAGS", "false")).booleanValue();
+
 }

Modified: geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/JspCompilationContext.java
URL: http://svn.apache.org/viewvc/geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/JspCompilationContext.java?rev=966967&r1=966966&r2=966967&view=diff
==============================================================================
--- geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/JspCompilationContext.java (original)
+++ geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/JspCompilationContext.java Fri Jul 23 05:20:00 2010
@@ -619,12 +619,7 @@ public class JspCompilationContext {
         try {
             getJspLoader();
             
-            String name;
-            if (isTagFile()) {
-                name = tagInfo.getTagClassName();
-            } else {
-                name = getServletPackageName() + "." + getServletClassName();
-            }
+            String name = getFQCN();
             servletClass = jspLoader.loadClass(name);
         } catch (ClassNotFoundException cex) {
             throw new JasperException(Localizer.getMessage("jsp.error.unable.load"),
@@ -637,6 +632,16 @@ public class JspCompilationContext {
         return servletClass;
     }
 
+    public String getFQCN() {
+        String name;
+        if (isTagFile()) {
+            name = tagInfo.getTagClassName();
+        } else {
+            name = getServletPackageName() + "." + getServletClassName();
+        }
+        return name;
+    }
+
     // ==================== protected methods ==================== 
 
     static Object outputDirLock = new Object();

Modified: geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/compiler/Generator.java
URL: http://svn.apache.org/viewvc/geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/compiler/Generator.java?rev=966967&r1=966966&r2=966967&view=diff
==============================================================================
--- geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/compiler/Generator.java (original)
+++ geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/compiler/Generator.java Fri Jul 23 05:20:00 2010
@@ -75,8 +75,8 @@ class Generator {
 
     private static final String VAR_EXPRESSIONFACTORY = 
         System.getProperty("org.apache.jasper.compiler.Generator.VAR_EXPRESSIONFACTORY", "_el_expressionfactory");
-    private static final String VAR_ANNOTATIONPROCESSOR = 
-        System.getProperty("org.apache.jasper.compiler.Generator.VAR_ANNOTATIONPROCESSOR", "_jsp_annotationprocessor");
+    private static final String VAR_INSTANCEMANAGER =
+        System.getProperty("org.apache.jasper.compiler.Generator.VAR_INSTANCEMANAGER", "_jsp_instancemanager");
 
     /* System property that controls if the requirement to have the object
      * used in jsp:getProperty action to be previously "introduced"
@@ -435,14 +435,14 @@ class Generator {
         }
         out.println(".getServletContext()).getExpressionFactory();");
 
-        out.printin(VAR_ANNOTATIONPROCESSOR);
-        out.print(" = (org.apache.AnnotationProcessor) ");
+        out.printin(VAR_INSTANCEMANAGER);
+        out.print(" = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(");
         if (ctxt.isTagFile()) {
             out.print("config");
         } else {
             out.print("getServletConfig()");
         }
-        out.println(".getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());");
+        out.println(");");
 
         out.popIndent();
         out.printil("}");
@@ -546,8 +546,8 @@ class Generator {
         out.printin("private javax.el.ExpressionFactory ");
         out.print(VAR_EXPRESSIONFACTORY);
         out.println(";");
-        out.printin("private org.apache.AnnotationProcessor ");
-        out.print(VAR_ANNOTATIONPROCESSOR);
+        out.printin("private org.apache.InstanceManager ");
+        out.print(VAR_INSTANCEMANAGER);
         out.println(";");
         out.println();
     }
@@ -2185,11 +2185,11 @@ class Generator {
 
             String tagHandlerClassName = JspUtil
                     .getCanonicalName(tagHandlerClass);
-            out.printin(tagHandlerClassName);
-            out.print(" ");
-            out.print(tagHandlerVar);
-            out.print(" = ");
             if (isPoolingEnabled && !(n.implementsJspIdConsumer())) {
+                out.printin(tagHandlerClassName);
+                out.print(" ");
+                out.print(tagHandlerVar);
+                out.print(" = ");
                 out.print("(");
                 out.print(tagHandlerClassName);
                 out.print(") ");
@@ -2198,14 +2198,7 @@ class Generator {
                 out.print(tagHandlerClassName);
                 out.println(".class);");
             } else {
-                out.print("new ");
-                out.print(tagHandlerClassName);
-                out.println("();");
-                out.printin("org.apache.jasper.runtime.AnnotationHelper.postConstruct(");
-                out.print(VAR_ANNOTATIONPROCESSOR);
-                out.print(", ");
-                out.print(tagHandlerVar);
-                out.println(");");
+                writeNewInstance(tagHandlerVar, tagHandlerClassName);
             }
 
             // includes setting the context
@@ -2263,8 +2256,7 @@ class Generator {
                         out.println("[0]++;");
                     }
                     out.printin(tagHandlerVar);
-                    out
-                            .println(".setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);");
+                    out.println(".setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);");
                     out.printin(tagHandlerVar);
                     out.println(".doInitBody();");
 
@@ -2290,6 +2282,40 @@ class Generator {
             n.setEndJavaLine(out.getJavaLine());
         }
 
+        private void writeNewInstance(String tagHandlerVar, String tagHandlerClassName) {
+        	if (Constants.USE_INSTANCE_MANAGER_FOR_TAGS) {
+        		out.printin(tagHandlerClassName);
+        		out.print(" ");
+        		out.print(tagHandlerVar);
+        		out.print(" = (");
+        		out.print(tagHandlerClassName);
+        		out.print(")");
+        		out.print(VAR_INSTANCEMANAGER);
+        		out.print(".newInstance(\"");
+        		out.print(tagHandlerClassName);
+        		out.println("\", this.getClass().getClassLoader());");
+        	} else {
+        		out.printin(tagHandlerClassName);
+        		out.print(" ");
+        		out.print(tagHandlerVar);
+        		out.print(" = (");
+        		out.print("new ");
+        		out.print(tagHandlerClassName);
+        		out.println("());");
+        		out.printin(VAR_INSTANCEMANAGER);
+        		out.print(".newInstance(");
+        		out.print(tagHandlerVar);
+        		out.println(");");
+        	}
+        }
+
+        private void writeDestroyInstance(String tagHandlerVar) {
+            out.printin(VAR_INSTANCEMANAGER);
+            out.print(".destroyInstance(");
+            out.print(tagHandlerVar);
+            out.println(");");
+        }
+
         private void generateCustomEnd(Node.CustomTag n, String tagHandlerVar,
                 String tagEvalVar, String tagPushBodyCountVar) {
 
@@ -2351,11 +2377,7 @@ class Generator {
                 } else {
                     out.printin(tagHandlerVar);
                     out.println(".release();");
-                    out.printin("org.apache.jasper.runtime.AnnotationHelper.preDestroy(");
-                    out.print(VAR_ANNOTATIONPROCESSOR);
-                    out.print(", ");
-                    out.print(tagHandlerVar);
-                    out.println(");");
+                    writeDestroyInstance(tagHandlerVar);
                 }
             }
             if (isTagFile || isFragment) {
@@ -2398,11 +2420,7 @@ class Generator {
             } else {
                 out.printin(tagHandlerVar);
                 out.println(".release();");
-                out.printin("org.apache.jasper.runtime.AnnotationHelper.preDestroy(");
-                out.print(VAR_ANNOTATIONPROCESSOR);
-                out.print(", ");
-                out.print(tagHandlerVar);
-                out.println(");");
+                writeDestroyInstance(tagHandlerVar);
             }
 
             if (n.implementsTryCatchFinally()) {
@@ -2434,21 +2452,8 @@ class Generator {
 
             String tagHandlerClassName = JspUtil
                     .getCanonicalName(tagHandlerClass);
-            out.printin(tagHandlerClassName);
-            out.print(" ");
-            out.print(tagHandlerVar);
-            out.print(" = ");
-            out.print("new ");
-            out.print(tagHandlerClassName);
-            out.println("();");
+            writeNewInstance(tagHandlerVar, tagHandlerClassName);
 
-            // Resource injection
-            out.printin("org.apache.jasper.runtime.AnnotationHelper.postConstruct(");
-            out.print(VAR_ANNOTATIONPROCESSOR);
-            out.print(", ");
-            out.print(tagHandlerVar);
-            out.println(");");
-            
             generateSetters(n, tagHandlerVar, handlerInfo, true);
 
             // JspIdConsumer (after context has been set)
@@ -2501,11 +2506,7 @@ class Generator {
             syncScriptingVars(n, VariableInfo.AT_END);
 
             // Resource injection
-            out.printin("org.apache.jasper.runtime.AnnotationHelper.preDestroy(");
-            out.print(VAR_ANNOTATIONPROCESSOR);
-            out.print(", ");
-            out.print(tagHandlerVar);
-            out.println(");");
+            writeDestroyInstance(tagHandlerVar);
 
             n.setEndJavaLine(out.getJavaLine());
         }

Added: geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/runtime/InstanceManagerFactory.java
URL: http://svn.apache.org/viewvc/geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/runtime/InstanceManagerFactory.java?rev=966967&view=auto
==============================================================================
--- geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/runtime/InstanceManagerFactory.java (added)
+++ geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/runtime/InstanceManagerFactory.java Fri Jul 23 05:20:00 2010
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.jasper.runtime;
+
+import javax.servlet.ServletConfig;
+
+import org.apache.InstanceManager;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class InstanceManagerFactory {
+
+    private InstanceManagerFactory() {
+    }
+
+    public static InstanceManager getInstanceManager(ServletConfig config) {
+        InstanceManager instanceManager = 
+        	(InstanceManager) config.getServletContext().getAttribute(InstanceManager.class.getName());
+        if (instanceManager == null) {
+            throw new IllegalStateException("No org.apache.InstanceManager set in ServletContext");
+        }
+        return instanceManager;
+    }
+
+}

Propchange: geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/runtime/InstanceManagerFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/runtime/InstanceManagerFactory.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/runtime/InstanceManagerFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/runtime/TagHandlerPool.java
URL: http://svn.apache.org/viewvc/geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/runtime/TagHandlerPool.java?rev=966967&r1=966966&r2=966967&view=diff
==============================================================================
--- geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/runtime/TagHandlerPool.java (original)
+++ geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/runtime/TagHandlerPool.java Fri Jul 23 05:20:00 2010
@@ -21,7 +21,7 @@ import javax.servlet.ServletConfig;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.Tag;
 
-import org.apache.AnnotationProcessor;
+import org.apache.InstanceManager;
 import org.apache.jasper.Constants;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -42,7 +42,7 @@ public class TagHandlerPool {
     
     // index of next available tag handler
     private int current;
-    protected AnnotationProcessor annotationProcessor = null;
+    protected InstanceManager instanceManager = null;
 
     public static TagHandlerPool getTagHandlerPool( ServletConfig config) {
         TagHandlerPool result=null;
@@ -78,8 +78,7 @@ public class TagHandlerPool {
         }
         this.handlers = new Tag[maxSize];
         this.current = -1;
-        this.annotationProcessor = 
-            (AnnotationProcessor) config.getServletContext().getAttribute(AnnotationProcessor.class.getName());
+        instanceManager = InstanceManagerFactory.getInstanceManager(config);
     }
 
     /**
@@ -112,7 +111,7 @@ public class TagHandlerPool {
      * @throws JspException if a tag handler cannot be instantiated
      */
     public Tag get(Class handlerClass) throws JspException {
-	Tag handler = null;
+    	Tag handler;
         synchronized( this ) {
             if (current >= 0) {
                 handler = handlers[current--];
@@ -123,9 +122,13 @@ public class TagHandlerPool {
         // Out of sync block - there is no need for other threads to
         // wait for us to construct a tag for this thread.
         try {
-            Tag instance = (Tag) handlerClass.newInstance();
-            AnnotationHelper.postConstruct(annotationProcessor, instance);
-            return instance;
+        	if (Constants.USE_INSTANCE_MANAGER_FOR_TAGS) {
+        		return (Tag) instanceManager.newInstance(handlerClass.getName(), handlerClass.getClassLoader());
+        	} else {
+                Tag instance = (Tag) handlerClass.newInstance();
+                instanceManager.newInstance(instance);
+                return instance;
+        	}
         } catch (Exception e) {
             throw new JspException(e.getMessage(), e);
         }
@@ -147,13 +150,11 @@ public class TagHandlerPool {
         }
         // There is no need for other threads to wait for us to release
         handler.release();
-        if (annotationProcessor != null) {
-            try {
-                AnnotationHelper.preDestroy(annotationProcessor, handler);
-            } catch (Exception e) {
-                log.warn("Error processing preDestroy on tag instance of " 
-                        + handler.getClass().getName(), e);
-            }
+        try {
+            instanceManager.destroyInstance(handler);
+        } catch (Exception e) {
+            log.warn("Error processing preDestroy on tag instance of "
+                    + handler.getClass().getName(), e);
         }
     }
 
@@ -164,13 +165,11 @@ public class TagHandlerPool {
     public synchronized void release() {
         for (int i = current; i >= 0; i--) {
             handlers[i].release();
-            if (annotationProcessor != null) {
-                try {
-                    AnnotationHelper.preDestroy(annotationProcessor, handlers[i]);
-                } catch (Exception e) {
-                    log.warn("Error processing preDestroy on tag instance of " 
-                            + handlers[i].getClass().getName(), e);
-                }
+            try {
+                instanceManager.destroyInstance(handlers[i]);
+            } catch (Exception e) {
+                log.warn("Error processing preDestroy on tag instance of "
+                        + handlers[i].getClass().getName(), e);
             }
         }
     }

Modified: geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/servlet/JspServletWrapper.java
URL: http://svn.apache.org/viewvc/geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/servlet/JspServletWrapper.java?rev=966967&r1=966966&r2=966967&view=diff
==============================================================================
--- geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/servlet/JspServletWrapper.java (original)
+++ geronimo/external/branches/tomcat-parent-6.0.29/jasper/src/main/java/org/apache/jasper/servlet/JspServletWrapper.java Fri Jul 23 05:20:00 2010
@@ -31,7 +31,7 @@ import javax.servlet.http.HttpServletReq
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.jsp.tagext.TagInfo;
 
-import org.apache.AnnotationProcessor;
+import org.apache.InstanceManager;
 import org.apache.jasper.JasperException;
 import org.apache.jasper.JspCompilationContext;
 import org.apache.jasper.Options;
@@ -39,6 +39,7 @@ import org.apache.jasper.compiler.ErrorD
 import org.apache.jasper.compiler.JavacErrorDetail;
 import org.apache.jasper.compiler.JspRuntimeContext;
 import org.apache.jasper.compiler.Localizer;
+import org.apache.jasper.runtime.InstanceManagerFactory;
 import org.apache.jasper.runtime.JspSourceDependent;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -68,7 +69,6 @@ public class JspServletWrapper {
 
     private Servlet theServlet;
     private String jspUri;
-    private Class servletClass;
     private Class tagHandlerClass;
     private JspCompilationContext ctxt;
     private long available = 0L;
@@ -139,15 +139,10 @@ public class JspServletWrapper {
                     destroy();
                     
                     Servlet servlet = null;
-                    
+
                     try {
-                        servletClass = ctxt.load();
-                        servlet = (Servlet) servletClass.newInstance();
-                        AnnotationProcessor annotationProcessor = (AnnotationProcessor) config.getServletContext().getAttribute(AnnotationProcessor.class.getName());
-                        if (annotationProcessor != null) {
-                           annotationProcessor.processAnnotations(servlet);
-                           annotationProcessor.postConstruct(servlet);
-                        }
+                        InstanceManager instanceManager = InstanceManagerFactory.getInstanceManager(config);
+                        servlet = (Servlet) instanceManager.newInstance(ctxt.getFQCN(), ctxt.getJspLoader());
                     } catch (IllegalAccessException e) {
                         throw new JasperException(e);
                     } catch (InstantiationException e) {
@@ -426,15 +421,13 @@ public class JspServletWrapper {
     public void destroy() {
         if (theServlet != null) {
             theServlet.destroy();
-            AnnotationProcessor annotationProcessor = (AnnotationProcessor) config.getServletContext().getAttribute(AnnotationProcessor.class.getName());
-            if (annotationProcessor != null) {
-                try {
-                    annotationProcessor.preDestroy(theServlet);
-                } catch (Exception e) {
-                    // Log any exception, since it can't be passed along
-                    log.error(Localizer.getMessage("jsp.error.file.not.found",
-                           e.getMessage()), e);
-                }
+            InstanceManager instanceManager = InstanceManagerFactory.getInstanceManager(config);
+            try {
+                instanceManager.destroyInstance(theServlet);
+            } catch (Exception e) {
+                // Log any exception, since it can't be passed along
+                log.error(Localizer.getMessage("jsp.error.file.not.found",
+                        e.getMessage()), e);
             }
         }
     }

Added: geronimo/external/branches/tomcat-parent-6.0.29/shared/src/main/java/org/apache/InstanceManager.java
URL: http://svn.apache.org/viewvc/geronimo/external/branches/tomcat-parent-6.0.29/shared/src/main/java/org/apache/InstanceManager.java?rev=966967&view=auto
==============================================================================
--- geronimo/external/branches/tomcat-parent-6.0.29/shared/src/main/java/org/apache/InstanceManager.java (added)
+++ geronimo/external/branches/tomcat-parent-6.0.29/shared/src/main/java/org/apache/InstanceManager.java Fri Jul 23 05:20:00 2010
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache;
+
+import java.lang.reflect.InvocationTargetException;
+
+import javax.naming.NamingException;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface InstanceManager {
+
+    public Object newInstance(String className)
+    	throws IllegalAccessException, InvocationTargetException, NamingException, 
+    		InstantiationException, ClassNotFoundException;
+
+    public Object newInstance(String fqcn, ClassLoader classLoader) 
+    	throws IllegalAccessException, InvocationTargetException, NamingException, 
+    		InstantiationException, ClassNotFoundException;
+
+    public void newInstance(Object o) 
+		throws IllegalAccessException, InvocationTargetException, NamingException;
+
+    public void destroyInstance(Object o)
+    	throws IllegalAccessException, InvocationTargetException;
+}

Propchange: geronimo/external/branches/tomcat-parent-6.0.29/shared/src/main/java/org/apache/InstanceManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/branches/tomcat-parent-6.0.29/shared/src/main/java/org/apache/InstanceManager.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/branches/tomcat-parent-6.0.29/shared/src/main/java/org/apache/InstanceManager.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message