geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r234133 - in /geronimo/trunk/modules: assembly/src/plan/ jetty-builder/src/java/org/apache/geronimo/jetty/deployment/ jetty-builder/src/test/org/apache/geronimo/jetty/deployment/ tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment...
Date Sat, 20 Aug 2005 22:41:41 GMT
Author: djencks
Date: Sat Aug 20 15:41:33 2005
New Revision: 234133

URL: http://svn.apache.org/viewcvs?rev=234133&view=rev
Log:
GERONIMO-589 give standalone web context a default context-root, and supply a defaultContextPriorityClassloader
setting.

Modified:
    geronimo/trunk/modules/assembly/src/plan/jetty-deployer-config.xml
    geronimo/trunk/modules/assembly/src/plan/jetty-runtime-deployer-config.xml
    geronimo/trunk/modules/assembly/src/plan/tomcat-deployer-config.xml
    geronimo/trunk/modules/assembly/src/plan/tomcat-runtime-deployer-config.xml
    geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
    geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
    geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java
    geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
    geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java
    geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
    geronimo/trunk/modules/web-builder/src/schema/geronimo-web.xsd

Modified: geronimo/trunk/modules/assembly/src/plan/jetty-deployer-config.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/jetty-deployer-config.xml?rev=234133&r1=234132&r2=234133&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/jetty-deployer-config.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/jetty-deployer-config.xml Sat Aug 20 15:41:33
2005
@@ -28,6 +28,7 @@
 <gbean name="WebBuilder" class="org.apache.geronimo.jetty.deployment.JettyModuleBuilder">
     <attribute name="defaultParentId">org/apache/geronimo/Server</attribute>
     <attribute name="defaultSessionTimeoutSeconds">1800</attribute>
+    <attribute name="defaultContextPriorityClassloader">false</attribute>
     <attribute name="defaultWelcomeFiles">index.html,index.htm,index.jsp</attribute>
     <attribute name="jettyContainerObjectName">geronimo.server:name=WebContainer,*</attribute>
     <reference name="DefaultServlets"><gbean-name>geronimo.deployer:j2eeType=DefaultServlet,J2EEModule=org/apache/geronimo/J2EEDeployer,*</gbean-name></reference>

Modified: geronimo/trunk/modules/assembly/src/plan/jetty-runtime-deployer-config.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/jetty-runtime-deployer-config.xml?rev=234133&r1=234132&r2=234133&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/jetty-runtime-deployer-config.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/jetty-runtime-deployer-config.xml Sat Aug 20
15:41:33 2005
@@ -27,6 +27,7 @@
 <gbean name="WebBuilder" class="org.apache.geronimo.jetty.deployment.JettyModuleBuilder">
     <attribute name="defaultParentId">org/apache/geronimo/Server</attribute>
     <attribute name="defaultSessionTimeoutSeconds">1800</attribute>
+    <attribute name="defaultContextPriorityClassloader">false</attribute>
     <attribute name="defaultWelcomeFiles">index.html,index.htm,index.jsp</attribute>
     <attribute name="jettyContainerObjectName">geronimo.server:name=WebContainer,*</attribute>
     <reference name="DefaultServlets"><gbean-name>geronimo.server:j2eeType=DefaultServlet,J2EEModule=org/apache/geronimo/RuntimeDeployer,*</gbean-name></reference>

Modified: geronimo/trunk/modules/assembly/src/plan/tomcat-deployer-config.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/tomcat-deployer-config.xml?rev=234133&r1=234132&r2=234133&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/tomcat-deployer-config.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/tomcat-deployer-config.xml Sat Aug 20 15:41:33
2005
@@ -19,6 +19,7 @@
 
     <gbean name="WebBuilder" class="org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder">
         <attribute name="defaultParentId">org/apache/geronimo/Server</attribute>
+        <attribute name="defaultContextPriorityClassloader">false</attribute>
         <attribute name="tomcatContainerObjectName">geronimo.server:name=WebContainer,*</attribute>
         <reference name="WebServiceBuilder"><name>WebServiceBuilder</name></reference>
         <reference name="Repository"><gbean-name>*:name=Repository,*</gbean-name></reference>

Modified: geronimo/trunk/modules/assembly/src/plan/tomcat-runtime-deployer-config.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/tomcat-runtime-deployer-config.xml?rev=234133&r1=234132&r2=234133&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/tomcat-runtime-deployer-config.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/tomcat-runtime-deployer-config.xml Sat Aug 20
15:41:33 2005
@@ -19,6 +19,7 @@
 
     <gbean name="WebBuilder" class="org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder">
         <attribute name="defaultParentId">org/apache/geronimo/Server</attribute>
+        <attribute name="defaultContextPriorityClassloader">false</attribute>
         <attribute name="tomcatContainerObjectName">geronimo.server:name=WebContainer,*</attribute>
         <reference name="WebServiceBuilder"><name>WebServiceBuilder</name></reference>
         <reference name="Repository"><gbean-name>*:name=Repository,*</gbean-name></reference>

Modified: geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?rev=234133&r1=234132&r2=234133&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
Sat Aug 20 15:41:33 2005
@@ -42,6 +42,7 @@
 import java.util.TreeSet;
 import java.util.jar.JarFile;
 import java.util.zip.ZipEntry;
+
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 import javax.security.jacc.WebResourcePermission;
@@ -131,6 +132,7 @@
     private final Collection defaultFilters;
     private final Collection defaultFilterMappings;
     private final GBeanData pojoWebServiceTemplate;
+    private final boolean defaultContextPriorityClassloader;
 
     private final WebServiceBuilder webServiceBuilder;
 
@@ -142,6 +144,7 @@
 
     public JettyModuleBuilder(URI defaultParentId,
                               Integer defaultSessionTimeoutSeconds,
+                              boolean defaultContextPriorityClassloader,
                               List defaultWelcomeFiles,
                               ObjectName jettyContainerObjectName,
                               Collection defaultServlets,
@@ -153,6 +156,7 @@
                               Kernel kernel) throws GBeanNotFoundException {
         this.defaultParentId = defaultParentId;
         this.defaultSessionTimeoutSeconds = (defaultSessionTimeoutSeconds == null) ? new
Integer(30 * 60) : defaultSessionTimeoutSeconds;
+        this.defaultContextPriorityClassloader = defaultContextPriorityClassloader;
         this.jettyContainerObjectName = jettyContainerObjectName;
         this.defaultServlets = defaultServlets;
         this.defaultFilters = defaultFilters;
@@ -218,7 +222,11 @@
         // parse vendor dd
         GerWebAppType jettyWebApp = getJettyWebApp(plan, moduleFile, standAlone, targetPath,
webApp);
         if (contextRoot == null) {
-            contextRoot = jettyWebApp.getContextRoot();
+            if (jettyWebApp.isSetContextRoot()) {
+                contextRoot = jettyWebApp.getContextRoot();
+            } else {
+                contextRoot = determineDefaultContextRoot(webApp, standAlone, moduleFile,
targetPath);
+            }
         }
 
         Map servletNameToPathMap = buildServletNameToPathMap(webApp, contextRoot);
@@ -321,15 +329,8 @@
                 jettyWebApp = (GerWebAppType) SchemaConversionUtils.convertToGeronimoServiceSchema(jettyWebApp);
                 SchemaConversionUtils.validateDD(jettyWebApp);
             } else {
-                String path;
-                if (standAlone) {
-                    // default configId is based on the moduleFile name
-                    path = new File(moduleFile.getName()).getName();
-                } else {
-                    // default configId is based on the module uri from the application.xml
-                    path = targetPath;
-                }
-                jettyWebApp = createDefaultPlan(path, webApp);
+                String defaultContextRoot = determineDefaultContextRoot(webApp, standAlone,
moduleFile, targetPath);
+                jettyWebApp = createDefaultPlan(defaultContextRoot);
             }
         } catch (XmlException e) {
             e.printStackTrace();
@@ -338,27 +339,45 @@
         return jettyWebApp;
     }
 
-    private GerWebAppType createDefaultPlan(String path, WebAppType webApp) {
-        String id = webApp.getId();
-        if (id == null) {
-            id = path;
-            if (id.endsWith(".war")) {
-                id = id.substring(0, id.length() - 4);
-            }
-            if (id.endsWith("/")) {
-                id = id.substring(0, id.length() - 1);
-            }
+    private String determineDefaultContextRoot(WebAppType webApp, boolean isStandAlone, JarFile
moduleFile, String targetPath) {
+
+        if (webApp != null && webApp.getId() != null) {
+            return webApp.getId();
+         }
+
+        if (isStandAlone) {
+            // default configId is based on the moduleFile name
+            return trimPath(new File(moduleFile.getName()).getName());
+        }
+
+        // default configId is based on the module uri from the application.xml
+        return trimPath(targetPath);
+    }
+
+    private String trimPath(String path) {
+
+        if (path == null) {
+            return null;
         }
 
-        GerWebAppType jettyWebApp = GerWebAppType.Factory.newInstance();
+        if (path.endsWith(".war")) {
+            path = path.substring(0, path.length() - 4);
+        }
+        if (path.endsWith("/")) {
+            path = path.substring(0, path.length() - 1);
+        }
+
+        return path;
+    }
+
+    private GerWebAppType createDefaultPlan(String contextRoot) {
+       GerWebAppType jettyWebApp = GerWebAppType.Factory.newInstance();
 
         // set the parentId, configId and context root
         jettyWebApp.setParentId(defaultParentId.toString());
-        if (null != webApp.getId()) {
-            id = webApp.getId();
-        }
-        jettyWebApp.setConfigId(id);
-        jettyWebApp.setContextRoot(id);
+        jettyWebApp.setConfigId(contextRoot);
+        jettyWebApp.setContextRoot(contextRoot);
+        jettyWebApp.setContextPriorityClassloader(defaultContextPriorityClassloader);
         return jettyWebApp;
     }
 
@@ -407,9 +426,9 @@
         WebAppType webApp = (WebAppType) webModule.getSpecDD();
         GerWebAppType jettyWebApp = (GerWebAppType) webModule.getVendorDD();
 
-        boolean contextPriorityClassLoader = false;
-        if (jettyWebApp != null) {
-            contextPriorityClassLoader = Boolean.valueOf(jettyWebApp.getContextPriorityClassloader()).booleanValue();
+        boolean contextPriorityClassLoader = defaultContextPriorityClassloader;
+        if (jettyWebApp != null && jettyWebApp.isSetContextPriorityClassloader())
{
+            contextPriorityClassLoader = jettyWebApp.getContextPriorityClassloader();
         }
         // construct the webClassLoader
         ClassLoader webClassLoader = getWebClassLoader(earContext, webModule, cl, contextPriorityClassLoader);
@@ -1339,6 +1358,7 @@
         GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(JettyModuleBuilder.class, NameFactory.MODULE_BUILDER);
         infoBuilder.addAttribute("defaultParentId", URI.class, true);
         infoBuilder.addAttribute("defaultSessionTimeoutSeconds", Integer.class, true);
+        infoBuilder.addAttribute("defaultContextPriorityClassloader", boolean.class, true);
         infoBuilder.addAttribute("defaultWelcomeFiles", List.class, true);
         infoBuilder.addAttribute("jettyContainerObjectName", ObjectName.class, true);
         infoBuilder.addReference("DefaultServlets", Object.class);
@@ -1353,6 +1373,7 @@
         infoBuilder.setConstructor(new String[]{
             "defaultParentId",
             "defaultSessionTimeoutSeconds",
+            "defaultContextPriorityClassloader",
             "defaultWelcomeFiles",
             "jettyContainerObjectName",
             "DefaultServlets",

Modified: geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java?rev=234133&r1=234132&r2=234133&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
(original)
+++ geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
Sat Aug 20 15:41:33 2005
@@ -282,7 +282,7 @@
         start(securityServiceGBean);
 
 
-        builder = new JettyModuleBuilder(new URI("null"), new Integer(1800), Collections.EMPTY_LIST,
containerName, defaultServlets, defaultFilters, defaultFilterMappings, pojoWebServiceTemplate,
webServiceBuilder, null, kernel);
+        builder = new JettyModuleBuilder(new URI("null"), new Integer(1800), false, Collections.EMPTY_LIST,
containerName, defaultServlets, defaultFilters, defaultFilterMappings, pojoWebServiceTemplate,
webServiceBuilder, null, kernel);
 
         container = new GBeanData(containerName, JettyContainerImpl.GBEAN_INFO);
 

Modified: geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java?rev=234133&r1=234132&r2=234133&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java
(original)
+++ geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java
Sat Aug 20 15:41:33 2005
@@ -3,6 +3,7 @@
 import java.io.File;
 import java.util.HashSet;
 import java.util.jar.JarFile;
+import java.net.URI;
 import javax.management.ObjectName;
 
 import junit.framework.TestCase;
@@ -13,6 +14,8 @@
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
 import org.apache.geronimo.xbeans.geronimo.web.GerWebAppDocument;
 import org.apache.geronimo.xbeans.geronimo.web.GerWebAppType;
+import org.apache.geronimo.xbeans.j2ee.WebAppDocument;
+import org.apache.geronimo.xbeans.j2ee.WebAppType;
 
 /**
  */
@@ -24,7 +27,7 @@
     private File basedir = new File(System.getProperty("basedir", "."));
 
     public PlanParsingTest() throws Exception {
-        builder = new JettyModuleBuilder(null, new Integer(1800), null, jettyContainerObjectName,
new HashSet(), new HashSet(), new HashSet(), pojoWebServiceTemplate, webServiceBuilder, null,
null);
+        builder = new JettyModuleBuilder(URI.create("defaultParent"), new Integer(1800),
false, null, jettyContainerObjectName, new HashSet(), new HashSet(), new HashSet(), pojoWebServiceTemplate,
webServiceBuilder, null, null);
     }
 
     public void testContents() throws Exception {
@@ -63,19 +66,83 @@
 
     public void testConstructPlan() throws Exception {
         GerWebAppDocument jettyWebAppDoc = GerWebAppDocument.Factory.newInstance();
-        GerWebAppType jettyWebAppType = jettyWebAppDoc.addNewWebApp();
-        jettyWebAppType.setConfigId("configId");
-        jettyWebAppType.setParentId("parentId");
-        jettyWebAppType.setContextPriorityClassloader(false);
-        GerResourceRefType ref = jettyWebAppType.addNewResourceRef();
+        GerWebAppType GerWebAppType = jettyWebAppDoc.addNewWebApp();
+        GerWebAppType.setConfigId("configId");
+        GerWebAppType.setParentId("parentId");
+        GerWebAppType.setContextPriorityClassloader(false);
+        GerResourceRefType ref = GerWebAppType.addNewResourceRef();
         ref.setRefName("ref");
         ref.setTargetName("target");
 
-        SchemaConversionUtils.validateDD(jettyWebAppType);
-        System.out.println(jettyWebAppType.toString());
+        SchemaConversionUtils.validateDD(GerWebAppType);
+        System.out.println(GerWebAppType.toString());
     }
 
-    public void testParseSpecDD() {
+    public void testContextPriorityClassloader() throws Exception {
+        File resourcePlan = new File(basedir, "src/test-resources/plans/plan3.xml");
+        assertTrue(resourcePlan.exists());
+
+        GerWebAppType jettyWebApp = builder.getJettyWebApp(resourcePlan, null, false, null,
null);
+        assertFalse(jettyWebApp.getContextPriorityClassloader());
+    }
+
+    public void testContextPriorityClassloaderTrue() throws Exception {
+        File resourcePlan = new File(basedir, "src/test-resources/plans/plan4.xml");
+        assertTrue(resourcePlan.exists());
+
+        GerWebAppType jettyWebApp = builder.getJettyWebApp(resourcePlan, null, false, null,
null);
+        assertTrue(jettyWebApp.getContextPriorityClassloader());
+
+    }
+
+    public void testContextRootWithPlanAndContextSet() throws Exception {
+
+        GerWebAppDocument jettyWebAppDoc = GerWebAppDocument.Factory.newInstance();
+        GerWebAppType GerWebAppType = jettyWebAppDoc.addNewWebApp();
+        GerWebAppType.setConfigId("myId");
+        GerWebAppType.setContextRoot("myContextRoot");
+        GerWebAppType.setContextPriorityClassloader(false);
+
+        JarFile dummyFile = new JarFile(new File(basedir, "src/test-resources/deployables/war2.war"));
+
+        GerWebAppType = builder.getJettyWebApp(GerWebAppType, dummyFile, true, null, null);
+
+        assertEquals("myContextRoot", GerWebAppType.getContextRoot());
+
+    }
+
+    public void testContextRootWithoutPlanStandAlone() throws Exception {
+
+        JarFile dummyFile = new JarFile(new File(basedir, "src/test-resources/deployables/war2.war"));
+        GerWebAppType GerWebAppType = builder.getJettyWebApp(null, dummyFile, true, null,
null);
+
+        assertEquals("war2", GerWebAppType.getContextRoot());
+
+    }
+
+    public void testContextRootWithoutPlanAndTargetPath() throws Exception {
+
+        JarFile dummyFile = new JarFile(new File(basedir, "src/test-resources/deployables/war2.war"));
+        GerWebAppType GerWebAppType = builder.getJettyWebApp(null, dummyFile, false, "myTargetPath",
null);
+
+        assertEquals("myTargetPath", GerWebAppType.getContextRoot());
+
+    }
+
+    public void testContextRootWithoutPlanButWebApp() throws Exception {
+
+        WebAppDocument webAppDocument = WebAppDocument.Factory.newInstance();
+        WebAppType webAppType = webAppDocument.addNewWebApp();
+        webAppType.setId("myId");
+
+        JarFile dummyFile = new JarFile(new File(basedir, "src/test-resources/deployables/war2.war"));
+        GerWebAppType GerWebAppType = builder.getJettyWebApp(null, dummyFile, false, "myTargetPath",
webAppType);
+
+        assertEquals("myId", GerWebAppType.getContextRoot());
+
+    }
+
+     public void testParseSpecDD() {
 
     }
 }

Modified: geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=234133&r1=234132&r2=234133&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Sat Aug 20 15:41:33 2005
@@ -103,6 +103,7 @@
 public class TomcatModuleBuilder implements ModuleBuilder {
 
     private final URI defaultParentId;
+    private final boolean defaultContextPriorityClassloader;
     private final ObjectName tomcatContainerObjectName;
 
     private final WebServiceBuilder webServiceBuilder;
@@ -110,10 +111,12 @@
     private final Repository repository;
 
     public TomcatModuleBuilder(URI defaultParentId,
+                               boolean defaultContextPriorityClassloader,
                                ObjectName tomcatContainerObjectName,
                                WebServiceBuilder webServiceBuilder,
                                Repository repository) {
         this.defaultParentId = defaultParentId;
+        this.defaultContextPriorityClassloader = defaultContextPriorityClassloader;
         this.tomcatContainerObjectName = tomcatContainerObjectName;
         this.webServiceBuilder = webServiceBuilder;
         this.repository = repository;
@@ -200,7 +203,7 @@
         module.setContextRoot(contextRoot);
         return module;
     }
-
+        
     /**
      * Some servlets will have multiple url patterns.  However, webservice servlets
      * will only have one, which is what this method is intended for.
@@ -336,9 +339,9 @@
         WebAppType webApp = (WebAppType) webModule.getSpecDD();
         GerWebAppType tomcatWebApp = (GerWebAppType) webModule.getVendorDD();
 
-        boolean contextPriorityClassLoader = false;
-        if (tomcatWebApp != null) {
-            contextPriorityClassLoader = Boolean.valueOf(tomcatWebApp.getContextPriorityClassloader()).booleanValue();
+        boolean contextPriorityClassLoader = defaultContextPriorityClassloader;
+        if (tomcatWebApp != null && tomcatWebApp.isSetContextPriorityClassloader())
{
+            contextPriorityClassLoader = tomcatWebApp.getContextPriorityClassloader();
         }
         // construct the webClassLoader
         ClassLoader webClassLoader = getWebClassLoader(earContext, webModule, cl, contextPriorityClassLoader);
@@ -415,7 +418,7 @@
                         webModuleData.setAttribute("crossContext",new Boolean(true));
                     }
                 }
-                
+
                 //Is there a Tomcat realm declaration?
                 String tomcatRealm = (String) values.remove("TomcatRealm");
                 if (tomcatRealm != null) {
@@ -833,7 +836,7 @@
 
     private Map buildComponentContext(EARContext earContext, Module webModule, WebAppType
webApp, GerWebAppType tomcatWebApp, UserTransaction userTransaction, ClassLoader cl) throws
DeploymentException {
         return ENCConfigBuilder.buildComponentContext(earContext,
-                earContext, 
+                earContext,
                 webModule,
                 userTransaction,
                 webApp.getEnvEntryArray(),
@@ -954,6 +957,7 @@
     static {
         GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(TomcatModuleBuilder.class, NameFactory.MODULE_BUILDER);
         infoBuilder.addAttribute("defaultParentId", URI.class, true);
+        infoBuilder.addAttribute("defaultContextPriorityClassloader", boolean.class, true);
         infoBuilder.addAttribute("tomcatContainerObjectName", ObjectName.class, true);
         infoBuilder.addReference("WebServiceBuilder", WebServiceBuilder.class, NameFactory.MODULE_BUILDER);
         infoBuilder.addReference("Repository", Repository.class, NameFactory.GERONIMO_SERVICE);
@@ -961,6 +965,7 @@
 
         infoBuilder.setConstructor(new String[]{
             "defaultParentId",
+            "defaultContextPriorityClassloader",
             "tomcatContainerObjectName",
             "WebServiceBuilder",
             "Repository"});

Modified: geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java?rev=234133&r1=234132&r2=234133&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java
(original)
+++ geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java
Sat Aug 20 15:41:33 2005
@@ -14,7 +14,7 @@
  */
 public class PlanParsingTest extends TestCase {
     ObjectName tomcatContainerObjectName = JMXUtil.getObjectName("test:type=TomcatContainer");
-    private TomcatModuleBuilder builder = new TomcatModuleBuilder(null, tomcatContainerObjectName,
null, null);
+    private TomcatModuleBuilder builder = new TomcatModuleBuilder(null, false, tomcatContainerObjectName,
null, null);
     private File basedir = new File(System.getProperty("basedir", "."));
 
     public void testResourceRef() throws Exception {

Modified: geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java?rev=234133&r1=234132&r2=234133&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
(original)
+++ geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
Sat Aug 20 15:41:33 2005
@@ -388,7 +388,7 @@
 
         WebServiceBuilder webServiceBuilder = new AxisBuilder();
 
-        builder = new TomcatModuleBuilder(new URI("null"), containerName, webServiceBuilder,
null);
+        builder = new TomcatModuleBuilder(new URI("null"), false, containerName, webServiceBuilder,
null);
 
         // Default Realm
         Map initParams = new HashMap();

Modified: geronimo/trunk/modules/web-builder/src/schema/geronimo-web.xsd
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/web-builder/src/schema/geronimo-web.xsd?rev=234133&r1=234132&r2=234133&view=diff
==============================================================================
--- geronimo/trunk/modules/web-builder/src/schema/geronimo-web.xsd (original)
+++ geronimo/trunk/modules/web-builder/src/schema/geronimo-web.xsd Sat Aug 20 15:41:33 2005
@@ -81,7 +81,7 @@
             <xs:element ref="sys:dependency" minOccurs="0" maxOccurs="unbounded"/>
 
             <xs:element name="context-root" type="xs:string" minOccurs="0"/>
-            <xs:element name="context-priority-classloader" type="xs:boolean"/>
+            <xs:element name="context-priority-classloader" type="xs:boolean" minOccurs="0"/>
             <xs:element name="container-config" type="web:container-configType" minOccurs="0"
maxOccurs="unbounded"/>
 
             <xs:sequence minOccurs="0">



Mime
View raw message