geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r577801 - in /geronimo/server/trunk: configs/jetty6/src/plan/ modules/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/ modules/geronimo-jetty6-builder/src/main/xsd/ modules/geronimo-jetty6-builder/src/test/java/o...
Date Thu, 20 Sep 2007 15:55:46 GMT
Author: vamsic007
Date: Thu Sep 20 08:55:44 2007
New Revision: 577801

URL: http://svn.apache.org/viewvc?rev=577801&view=rev
Log:
GERONIMO-2964 Cannot specify the Tomcat work directory for a web application
  o Committing GERONIMO-2964-trunk.patch submitted in the JIRA
  o geronimo-web.xml can now have a "work-dir" tag to specify the work directory to be used
by the application.
  o For Tomcat this work directory will be relative to "catalina.home"
  o For Jetty this work directory will be relative to jetty home which is var/jetty by default.

Modified:
    geronimo/server/trunk/configs/jetty6/src/plan/plan.xml
    geronimo/server/trunk/modules/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
    geronimo/server/trunk/modules/geronimo-jetty6-builder/src/main/xsd/geronimo-jetty-2.0.xsd
    geronimo/server/trunk/modules/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilderTest.java
    geronimo/server/trunk/modules/geronimo-jetty6-builder/src/test/resources/deployables/war1/WEB-INF/geronimo-web.xml
    geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainer.java
    geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainerImpl.java
    geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java
    geronimo/server/trunk/modules/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/AbstractWebModuleTest.java
    geronimo/server/trunk/modules/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/GBeanInfoTest.java
    geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
    geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/xsd/geronimo-tomcat-2.0.xsd
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContext.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
    geronimo/server/trunk/modules/geronimo-web-2.5-builder/src/main/xsd/geronimo-web-2.0.xsd

Modified: geronimo/server/trunk/configs/jetty6/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jetty6/src/plan/plan.xml?rev=577801&r1=577800&r2=577801&view=diff
==============================================================================
--- geronimo/server/trunk/configs/jetty6/src/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/jetty6/src/plan/plan.xml Thu Sep 20 08:55:44 2007
@@ -41,6 +41,10 @@
 
     <!-- default WAR container using Jetty -->
     <gbean name="JettyWebContainer" class="org.apache.geronimo.jetty6.JettyContainerImpl">
+      <attribute name="jettyHome">var/jetty</attribute>
+      <reference name="ServerInfo">
+        <name>ServerInfo</name>
+      </reference>
       <reference name="WebManager">
         <name>JettyWebManager</name>
       </reference>

Modified: geronimo/server/trunk/modules/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java?rev=577801&r1=577800&r2=577801&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
Thu Sep 20 08:55:44 2007
@@ -359,6 +359,11 @@
             }
             webModuleData.setAttribute("contextPath", contextPath);
 
+            if (jettyWebApp.isSetWorkDir()) {
+                String workDir = jettyWebApp.getWorkDir();
+                webModuleData.setAttribute("workDir", workDir);
+            }
+
             if (jettyWebApp.isSetWebContainer()) {
                 AbstractNameQuery webContainerName = ENCConfigBuilder.getGBeanQuery(NameFactory.GERONIMO_SERVICE,
jettyWebApp.getWebContainer());
                 webModuleData.setReferencePattern("JettyContainer", webContainerName);

Modified: geronimo/server/trunk/modules/geronimo-jetty6-builder/src/main/xsd/geronimo-jetty-2.0.xsd
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6-builder/src/main/xsd/geronimo-jetty-2.0.xsd?rev=577801&r1=577800&r2=577801&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6-builder/src/main/xsd/geronimo-jetty-2.0.xsd
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6-builder/src/main/xsd/geronimo-jetty-2.0.xsd
Thu Sep 20 08:55:44 2007
@@ -119,6 +119,19 @@
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
+
+            <xs:element name="work-dir" type="xs:string" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>
+                        This is the work directory that will be used by this
+                        application.  The directory location will be relative
+                        to jetty home, which is var/jetty by default.  Note
+                        that this is different from "jetty.home" system
+                        property.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+
             <xs:element ref="app:clustering" minOccurs="0">
                 <xs:annotation>
                     <xs:documentation>

Modified: geronimo/server/trunk/modules/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilderTest.java?rev=577801&r1=577800&r2=577801&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilderTest.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilderTest.java
Thu Sep 20 08:55:44 2007
@@ -219,7 +219,8 @@
 
         ConfigurationData bootstrap = new ConfigurationData(baseId, naming);
 
-        bootstrap.addGBean("ServerInfo", BasicServerInfo.GBEAN_INFO).setAttribute("baseDirectory",
".");
+        GBeanData serverInfo = bootstrap.addGBean("ServerInfo", BasicServerInfo.GBEAN_INFO);
+        serverInfo.setAttribute("baseDirectory", ".");
 
         AbstractName configStoreName = bootstrap.addGBean("MockConfigurationStore", MockConfigStore.GBEAN_INFO).getAbstractName();
 
@@ -245,6 +246,8 @@
 
         GBeanData containerData = bootstrap.addGBean("JettyContainer", JettyContainerImpl.GBEAN_INFO);
         AbstractName containerName = containerData.getAbstractName();
+        containerData.setAttribute("jettyHome", new File(BASEDIR, "target/var/jetty").toString());
+        containerData.setReferencePattern("ServerInfo", serverInfo.getAbstractName());
 
         GBeanData connector = bootstrap.addGBean("JettyConnector", HTTPSocketConnector.GBEAN_INFO);
         connector.setAttribute("port", new Integer(5678));

Modified: geronimo/server/trunk/modules/geronimo-jetty6-builder/src/test/resources/deployables/war1/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6-builder/src/test/resources/deployables/war1/WEB-INF/geronimo-web.xml?rev=577801&r1=577800&r2=577801&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6-builder/src/test/resources/deployables/war1/WEB-INF/geronimo-web.xml
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6-builder/src/test/resources/deployables/war1/WEB-INF/geronimo-web.xml
Thu Sep 20 08:55:44 2007
@@ -29,6 +29,7 @@
     </environment>
 
     <jetty:context-root>/test</jetty:context-root>
+    <jetty:work-dir>myworkdir</jetty:work-dir>
     <!--
         <jetty:security>
             <sec:default-principal>

Modified: geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainer.java?rev=577801&r1=577800&r2=577801&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainer.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainer.java
Thu Sep 20 08:55:44 2007
@@ -17,6 +17,8 @@
 
 package org.apache.geronimo.jetty6;
 
+import java.io.File;
+
 import org.apache.geronimo.management.geronimo.WebContainer;
 import org.mortbay.jetty.Connector;
 import org.mortbay.jetty.RequestLog;
@@ -50,4 +52,5 @@
 
     RequestLog getRequestLog();
 
+    File resolveToJettyHome(String workDir);
 }

Modified: geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainerImpl.java?rev=577801&r1=577800&r2=577801&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainerImpl.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainerImpl.java
Thu Sep 20 08:55:44 2007
@@ -17,6 +17,7 @@
 
 package org.apache.geronimo.jetty6;
 
+import java.io.File;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -28,6 +29,7 @@
 import org.apache.geronimo.management.StatisticsProvider;
 import org.apache.geronimo.management.geronimo.NetworkConnector;
 import org.apache.geronimo.management.geronimo.WebManager;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.webservices.SoapHandler;
 import org.apache.geronimo.webservices.WebServiceContainer;
 import org.mortbay.jetty.Connector;
@@ -45,10 +47,18 @@
  * @version $Rev$ $Date$
  */
 public class JettyContainerImpl implements JettyContainer, SoapHandler, GBeanLifecycle, StatisticsProvider
{
+    /**
+     * The default value of JETTY_HOME variable
+     */
+    private static final String DEFAULT_JETTY_HOME = "var/jetty";
+
     private final Server server;
     private final Map webServices = new HashMap();
     private final String objectName;
     private final WebManager manager;
+    private final String jettyHome;
+    private final ServerInfo serverInfo;
+    private File jettyHomeDir;
     private JettyWebContainerStatsImpl stats;
     private final Map realms = new HashMap();
     private HandlerCollection handlerCollection = new HandlerCollection();
@@ -56,8 +66,11 @@
     private DefaultHandler defaultHandler = new DefaultHandler();
     private RequestLogHandler requestLogHandler = new RequestLogHandler();
 
-    public JettyContainerImpl(String objectName, WebManager manager) {
+    public JettyContainerImpl(String objectName, WebManager manager, String jettyHome, ServerInfo
serverInfo) {
         this.objectName = objectName;
+        this.jettyHome = jettyHome;
+        this.serverInfo = serverInfo;
+
         server = new JettyServer();
 
         //set up the new jetty6 handler structure which is to have a HandlerCollection,
@@ -238,12 +251,22 @@
         this.requestLogHandler.setRequestLog(log);
     }
 
+    public File resolveToJettyHome(String workDir) {
+        if(workDir == null) {
+            return null;
+        }
+        return new File(jettyHomeDir, workDir);
+    }
     /* ------------------------------------------------------------ */
     public RequestLog getRequestLog() {
         return this.requestLogHandler.getRequestLog();
     }
 
     public void doStart() throws Exception {
+        jettyHomeDir = new File(serverInfo.resolveServerPath(jettyHome != null ? jettyHome
: DEFAULT_JETTY_HOME));
+        if(!jettyHomeDir.exists()) {
+            jettyHomeDir.mkdirs();
+        }
         server.start();
     }
 
@@ -282,10 +305,13 @@
         infoBuilder.addAttribute("objectName", String.class, false);
         infoBuilder.addReference("WebManager", WebManager.class);
 
+        infoBuilder.addAttribute("jettyHome", String.class, true);
+        infoBuilder.addReference("ServerInfo", ServerInfo.class, "GBean");
+
         infoBuilder.addInterface(SoapHandler.class);
         infoBuilder.addInterface(JettyContainer.class);
         infoBuilder.addInterface(StatisticsProvider.class);
-        infoBuilder.setConstructor(new String[]{"objectName", "WebManager"});
+        infoBuilder.setConstructor(new String[]{"objectName", "WebManager", "jettyHome",
"ServerInfo"});
 
         GBEAN_INFO = infoBuilder.getBeanInfo();
     }

Modified: geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java?rev=577801&r1=577800&r2=577801&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java
Thu Sep 20 08:55:44 2007
@@ -17,6 +17,7 @@
 
 package org.apache.geronimo.jetty6;
 
+import java.io.File;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.ArrayList;
@@ -293,6 +294,13 @@
         return this.webAppContext.getContextPath();
     }
 
+    public void setWorkDir(String workDir) {
+        if(workDir == null) {
+            return;
+        }
+        this.webAppContext.setTempDirectory(jettyContainer.resolveToJettyHome(workDir));
+    }
+    
     public ClassLoader getWebClassLoader() {
         return webClassLoader;
     }
@@ -559,6 +567,7 @@
 
         infoBuilder.addAttribute("contextPath", String.class, true);
 
+        infoBuilder.addAttribute("workDir", String.class, true);
         infoBuilder.addReference("Host", Host.class, "Host");
         infoBuilder.addReference("TransactionManager", TransactionManager.class, NameFactory.TRANSACTION_MANAGER);
         infoBuilder.addReference("TrackedConnectionAssociator", TrackedConnectionAssociator.class,
NameFactory.JCA_CONNECTION_TRACKER);

Modified: geronimo/server/trunk/modules/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/AbstractWebModuleTest.java?rev=577801&r1=577800&r2=577801&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/AbstractWebModuleTest.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/AbstractWebModuleTest.java
Thu Sep 20 08:55:44 2007
@@ -181,7 +181,8 @@
 
         configurationBaseURL = cl.getResource("deployables/");
 
-        container = new JettyContainerImpl("test:name=JettyContainer", null);
+        ServerInfo serverInfo = new BasicServerInfo(".");
+        container = new JettyContainerImpl("test:name=JettyContainer", null, new File(BASEDIR,
"target/var/jetty").toString(), serverInfo);
         container.doStart();
         connector = new HTTPSocketConnector(container, null);
         connector.setPort(5678);

Modified: geronimo/server/trunk/modules/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/GBeanInfoTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/GBeanInfoTest.java?rev=577801&r1=577800&r2=577801&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/GBeanInfoTest.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/GBeanInfoTest.java
Thu Sep 20 08:55:44 2007
@@ -20,6 +20,8 @@
 
 import junit.framework.TestCase;
 import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.system.serverinfo.BasicServerInfo;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
 
 /**
  * @version $Rev$ $Date$
@@ -33,6 +35,7 @@
 
     public void testJettyContainerImpl() throws Exception {
         JettyContainerImpl.getGBeanInfo();
-        new JettyContainerImpl(null, null);
+        ServerInfo serverInfo = new BasicServerInfo(".");
+        new JettyContainerImpl(null, null, null, serverInfo);
     }
 }

Modified: geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=577801&r1=577800&r2=577801&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Thu Sep 20 08:55:44 2007
@@ -329,6 +329,10 @@
             if (tomcatWebApp.isSetCrossContext()) {
                 webModuleData.setAttribute("crossContext", Boolean.TRUE);
             }
+            if (tomcatWebApp.isSetWorkDir()) {
+                String workDir = tomcatWebApp.getWorkDir();
+                webModuleData.setAttribute("workDir", workDir);
+            }
             if (tomcatWebApp.isSetDisableCookies()) {
                 webModuleData.setAttribute("disableCookies", Boolean.TRUE);
             }

Modified: geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/xsd/geronimo-tomcat-2.0.xsd
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/xsd/geronimo-tomcat-2.0.xsd?rev=577801&r1=577800&r2=577801&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/xsd/geronimo-tomcat-2.0.xsd
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/xsd/geronimo-tomcat-2.0.xsd
Thu Sep 20 08:55:44 2007
@@ -115,6 +115,16 @@
                 </xs:annotation>
             </xs:element>
 
+            <xs:element name="work-dir" type="xs:string" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>
+                        This is the work directory that will be used by this
+                        application.  The directory location will be relative
+                        to "catalina.home".
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+
             <!--<xs:element name="context-priority-classloader" type="xs:boolean" minOccurs="0"/>-->
 
             <xs:element ref="naming:web-container" minOccurs="0">

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java?rev=577801&r1=577800&r2=577801&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
Thu Sep 20 08:55:44 2007
@@ -178,6 +178,8 @@
 
         this.setCrossContext(ctx.isCrossContext());
 
+        this.setWorkDir(ctx.getWorkDir());
+
         this.setCookies(!ctx.isDisableCookies());
 
         //Set the Dispatch listener

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContext.java?rev=577801&r1=577800&r2=577801&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContext.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContext.java
Thu Sep 20 08:55:44 2007
@@ -75,6 +75,8 @@
 
     public boolean isCrossContext();
 
+    public String getWorkDir();
+
     public boolean isDisableCookies();
 
     public Map getWebServices();

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java?rev=577801&r1=577800&r2=577801&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
Thu Sep 20 08:55:44 2007
@@ -105,6 +105,8 @@
     private final Manager manager;
 
     private final boolean crossContext;
+    
+    private final String workDir;
 
     private final boolean disableCookies;
 
@@ -167,6 +169,7 @@
             CatalinaClusterGBean cluster,
             ManagerGBean manager,
             boolean crossContext,
+            String workDir,
             boolean disableCookies,
             Map webServices,
             Holder holder,
@@ -269,6 +272,8 @@
         }
 
         this.crossContext = crossContext;
+        
+        this.workDir = workDir;
 
         this.disableCookies = disableCookies;
 
@@ -439,6 +444,10 @@
         return crossContext;
     }
 
+    public String getWorkDir() {
+        return workDir;
+    }
+    
     public Map getWebServices(){
         return webServices;
     }
@@ -585,6 +594,7 @@
         infoBuilder.addReference("Cluster", CatalinaClusterGBean.class, CatalinaClusterGBean.J2EE_TYPE);
         infoBuilder.addReference("Manager", ManagerGBean.class);
         infoBuilder.addAttribute("crossContext", boolean.class, true);
+        infoBuilder.addAttribute("workDir", String.class, true);
         infoBuilder.addAttribute("disableCookies", boolean.class, true);
         infoBuilder.addAttribute("webServices", Map.class, true);
         infoBuilder.addAttribute("holder", Holder.class, true);
@@ -615,6 +625,7 @@
                 "Cluster",
                 "Manager",
                 "crossContext",
+                "workDir",
                 "disableCookies",
                 "webServices",
                 "holder",

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java?rev=577801&r1=577800&r2=577801&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
Thu Sep 20 08:55:44 2007
@@ -87,6 +87,7 @@
                 null,
                 null,
                 false,
+                null,
                 false,
                 null,
                 null,

Modified: geronimo/server/trunk/modules/geronimo-web-2.5-builder/src/main/xsd/geronimo-web-2.0.xsd
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-web-2.5-builder/src/main/xsd/geronimo-web-2.0.xsd?rev=577801&r1=577800&r2=577801&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-web-2.5-builder/src/main/xsd/geronimo-web-2.0.xsd
(original)
+++ geronimo/server/trunk/modules/geronimo-web-2.5-builder/src/main/xsd/geronimo-web-2.0.xsd
Thu Sep 20 08:55:44 2007
@@ -68,6 +68,16 @@
             </xs:element>
 
             <xs:element name="context-root" type="xs:string" minOccurs="0"/>
+            <xs:element name="work-dir" type="xs:string" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>
+                        This is the work directory that will be used by this application.
+                        For Jetty this will be relative to jetty home which is var/jetty
+                        by default.
+                        For Tomcat this will be relative to "catalina.home".
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
             <!--<xs:element name="context-priority-classloader" type="xs:boolean" minOccurs="0"/>-->
             <xs:element ref="naming:web-container" minOccurs="0"/>
             <xs:element name="container-config" type="web:container-configType" minOccurs="0">



Mime
View raw message