Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 70174 invoked from network); 29 Nov 2004 14:41:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 29 Nov 2004 14:41:16 -0000 Received: (qmail 21795 invoked by uid 500); 29 Nov 2004 14:41:16 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 21772 invoked by uid 500); 29 Nov 2004 14:41:15 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@geronimo.apache.org Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 21756 invoked by uid 99); 29 Nov 2004 14:41:15 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 29 Nov 2004 06:41:14 -0800 Received: (qmail 70118 invoked by uid 65534); 29 Nov 2004 14:41:13 -0000 Date: 29 Nov 2004 14:41:13 -0000 Message-ID: <20041129144113.70112.qmail@minotaur.apache.org> From: jlaskowski@apache.org To: scm@geronimo.apache.org Subject: svn commit: r106911 - in geronimo/trunk/modules/tomcat: . src/java/org/apache/geronimo/tomcat src/plan src/var MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: jlaskowski Date: Mon Nov 29 06:41:11 2004 New Revision: 106911 URL: http://svn.apache.org/viewcvs?view=rev&rev=106911 Log: o module finally builds and deploys o Upgrade to Apache Tomcat 5.5.4 (libs still on my account at cvs.apache.org) o TomcatGBean renamed to TomcatContainer to be consistent with the Jetty module ideas o org/apache/geronimo/Tomcat can be started from any directory (use of the ServerInfo class) o TODO: Deploy wars according to Geronimo rules (see jetty-builder) To Eclipse users: don't forget to 'maven eclipse' in the module/tomcat directory. Added: geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContainer.java - copied, changed from r106910, geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatGBean.java Removed: geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatGBean.java Modified: geronimo/trunk/modules/tomcat/maven.xml geronimo/trunk/modules/tomcat/project.xml geronimo/trunk/modules/tomcat/src/plan/tomcat-plan.xml geronimo/trunk/modules/tomcat/src/var/server.xml Modified: geronimo/trunk/modules/tomcat/maven.xml Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/maven.xml?view=diff&rev=106911&p1=geronimo/trunk/modules/tomcat/maven.xml&r1=106910&p2=geronimo/trunk/modules/tomcat/maven.xml&r2=106911 ============================================================================== --- geronimo/trunk/modules/tomcat/maven.xml (original) +++ geronimo/trunk/modules/tomcat/maven.xml Mon Nov 29 06:41:11 2004 @@ -74,52 +74,22 @@ file="${maven.repo.local}/commons-modeler/jars/commons-modeler-&commons-modeler-version;.jar"/> - - - + + + Deploy your webapps to ${tomcatWebappDir} + + Deploying Apache Tomcat configuration - + - - + - - Modified: geronimo/trunk/modules/tomcat/project.xml Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/project.xml?view=diff&rev=106911&p1=geronimo/trunk/modules/tomcat/project.xml&r1=106910&p2=geronimo/trunk/modules/tomcat/project.xml&r2=106911 ============================================================================== --- geronimo/trunk/modules/tomcat/project.xml (original) +++ geronimo/trunk/modules/tomcat/project.xml Mon Nov 29 06:41:11 2004 @@ -53,6 +53,11 @@ ${pom.currentVersion} + geronimo + geronimo-system + ${pom.currentVersion} + + geronimo-spec geronimo-spec-j2ee &geronimo-spec-j2ee-version; @@ -63,7 +68,9 @@ tomcat catalina - &tomcat-version; + + + 5.5.4 http://jakarta.apache.org/tomcat/ true @@ -72,7 +79,9 @@ tomcat tomcat-coyote - &tomcat-version; + + + 5.5.4 http://jakarta.apache.org/tomcat/ true @@ -80,8 +89,10 @@ tomcat - tomcat-http11 - &tomcat-version; + tomcat-http + + + 5.5.4 http://jakarta.apache.org/tomcat/ true @@ -90,7 +101,9 @@ tomcat jasper-compiler - &tomcat-version; + + + 5.5.4 http://jakarta.apache.org/tomcat/ true @@ -99,7 +112,9 @@ tomcat jasper-runtime - &tomcat-version; + + + 5.5.4 http://jakarta.apache.org/tomcat/ true @@ -108,16 +123,9 @@ tomcat tomcat-util - &tomcat-version; - http://jakarta.apache.org/tomcat/ - - true - - - - tomcat - naming-common - &tomcat-version; + + + 5.5.4 http://jakarta.apache.org/tomcat/ true @@ -126,16 +134,9 @@ tomcat naming-resources - &tomcat-version; - http://jakarta.apache.org/tomcat/ - - true - - - - tomcat - servlets-common - &tomcat-version; + + + 5.5.4 http://jakarta.apache.org/tomcat/ true @@ -144,7 +145,9 @@ tomcat servlets-default - &tomcat-version; + + + 5.5.4 http://jakarta.apache.org/tomcat/ true @@ -153,7 +156,9 @@ tomcat servlets-invoker - &tomcat-version; + + + 5.5.4 http://jakarta.apache.org/tomcat/ true @@ -220,6 +225,14 @@ regexp ®exp-version; http://jakarta.apache.org/regexp/ + + true + + + + mx4j + mx4j + &mx4j-version; true Copied: geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContainer.java (from r106910, geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatGBean.java) Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContainer.java?view=diff&rev=106911&p1=geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatGBean.java&r1=106910&p2=geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContainer.java&r2=106911 ============================================================================== --- geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatGBean.java (original) +++ geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContainer.java Mon Nov 29 06:41:11 2004 @@ -1,128 +1,128 @@ -/** - * - * Copyright 2003-2004 The Apache Software Foundation - * - * Licensed 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.geronimo.tomcat; - -import org.apache.catalina.startup.Catalina; -import org.apache.catalina.util.ServerInfo; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.geronimo.gbean.GBeanInfo; -import org.apache.geronimo.gbean.GBeanInfoBuilder; -import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.GReferenceInfo; - -/** - * Apache Tomcat GBean - * - * @see http://wiki.apache.org/geronimo/Tomcat - * @see http://nagoya.apache.org/jira/browse/GERONIMO-215 - * - * @version $Rev: 46019 $ $Date: 2004-09-14 11:56:06 +0200 (Tue, 14 Sep 2004) $ - */ -public class TomcatGBean implements GBeanLifecycle { - - private static final Log log = LogFactory.getLog(TomcatGBean.class); - - /** - * Reference to the org.apache.catalina.startup.Bootstrap shell. Right now - * we're just wrapping up the shell, but we'll be replacing it with our own - * GBean shell for ease of management. - */ - private Catalina shell; - - /** - * Reference to the ServerInfo object. This is received through the - * constructor, and can be used to get information about the Server, most - * notably including the location of the server installation directory (and - * thus the Tomcat base dir). - */ - private final ServerInfo serverInfo; - - private String catalinaHome; - - private String catalinaBase; - - private String catalinaConfig = "var/catalina/server.xml"; - - /** - * Reference to the Catalina shell, to which calls are delegated. - * - * The catalina shell relies on the "catalina.home" and "catalina.base" - * System properties. Presumably, these could be added in a simple - * properties file, but I'm going to work under the assumption that we'll - * want them as persistent attributes in a server configuration. This will - * make them more easily manageable (in theory--we'll see) - */ - public TomcatGBean(ServerInfo serverInfo, String catalinaHome, String catalinaBase, String catalinaConfig) { - this.serverInfo = serverInfo; - this.catalinaHome = catalinaHome; - this.catalinaBase = catalinaBase; - this.catalinaConfig = catalinaConfig; - } - - public void doFail() { - try { - doStop(); - } catch (Exception ignored) { - } - } - - public void doStart() throws Exception { - log.debug("catalinaHome: " + catalinaHome + ", catalinaBase: " + catalinaBase + ", catalinaConfig: " - + catalinaConfig); - if (shell == null) { - shell = new Catalina(); - } - if (catalinaHome != null && catalinaHome.length() > 0) { - shell.setCatalinaHome(catalinaHome); - } - if (catalinaBase != null && catalinaBase.length() > 0) { - shell.setCatalinaBase(catalinaBase); - } - if (catalinaConfig != null && catalinaConfig.length() > 0) { - shell.setConfig(catalinaConfig); - } - shell.setParentClassLoader(this.getClass().getClassLoader()); - shell.setUseNaming(false); - shell.start(); - } - - public void doStop() throws Exception { - if (shell != null) { - shell.stop(); - shell = null; - } - } - - public static final GBeanInfo GBEAN_INFO; - - static { - GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(TomcatGBean.class.getName()); - - infoFactory.setConstructor(new String[] { "ServerInfo", "CatalinaHome", "CatalinaBase", "CatalinaConfig" }); - - infoFactory.addReference(new GReferenceInfo("ServerInfo", ServerInfo.class.getName())); - infoFactory.addAttribute("CatalinaHome", String.class, true); - infoFactory.addAttribute("CatalinaBase", String.class, true); - infoFactory.addAttribute("CatalinaConfig", String.class, true); - GBEAN_INFO = infoFactory.getBeanInfo(); - } - - public static GBeanInfo getGBeanInfo() { - return GBEAN_INFO; - } +/** + * + * Copyright 2003-2004 The Apache Software Foundation + * + * Licensed 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.geronimo.tomcat; + +import org.apache.catalina.startup.Catalina; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.geronimo.gbean.GBeanInfo; +import org.apache.geronimo.gbean.GBeanInfoBuilder; +import org.apache.geronimo.gbean.GBeanLifecycle; +import org.apache.geronimo.system.serverinfo.ServerInfo; + +/** + * Apache Tomcat GBean + * + * @see http://wiki.apache.org/geronimo/Tomcat + * @see http://nagoya.apache.org/jira/browse/GERONIMO-215 + * + * @version $Rev: 46019 $ $Date: 2004-09-14 11:56:06 +0200 (Tue, 14 Sep 2004) $ + */ +public class TomcatContainer implements GBeanLifecycle { + + private static final Log log = LogFactory.getLog(TomcatContainer.class); + + /** + * Reference to the org.apache.catalina.startup.Bootstrap shell. Right now + * we're just wrapping up the shell, but we'll be replacing it with our own + * GBean shell for ease of management. + */ + private Catalina shell; + + /** + * Used to resolve the location of the configuration file. + */ + private final ServerInfo serverInfo; + + private String catalinaHome; + + private String catalinaBase; + + private String catalinaConfig = "var/catalina/server.xml"; + + /** + * Reference to the Catalina shell, to which calls are delegated. + * + * The catalina shell relies on the "catalina.home" and "catalina.base" + * System properties. Presumably, these could be added in a simple + * properties file, but I'm going to work under the assumption that we'll + * want them as persistent attributes in a server configuration. This will + * make them more easily manageable (in theory--we'll see) + */ + public TomcatContainer(ServerInfo serverInfo, String catalinaHome, String catalinaBase, String catalinaConfig) { + this.serverInfo = serverInfo; + this.catalinaHome = catalinaHome; + this.catalinaBase = catalinaBase; + this.catalinaConfig = catalinaConfig; + } + + public void doFail() { + try { + doStop(); + } catch (Exception ignored) { + } + } + + public void doStart() throws Exception { + log.debug("catalinaHome: " + catalinaHome + ", catalinaBase: " + catalinaBase + ", catalinaConfig: " + + catalinaConfig); + if (shell == null) { + shell = new Catalina(); + } + if (catalinaHome != null && catalinaHome.length() > 0) { + catalinaHome = serverInfo.resolve(catalinaHome).getPath(); + log.debug("catalinaHome ServerInfo.resolve'd: " + catalinaHome); + shell.setCatalinaHome(catalinaHome); + } + if (catalinaBase != null && catalinaBase.length() > 0) { + catalinaBase = serverInfo.resolve(catalinaBase).getPath(); + log.debug("catalinaBase ServerInfo.resolve'd: " + catalinaBase); + shell.setCatalinaBase(catalinaBase); + } + if (catalinaConfig != null && catalinaConfig.length() > 0) { + shell.setConfig(catalinaConfig); + } + shell.setParentClassLoader(this.getClass().getClassLoader()); + shell.setUseNaming(false); + shell.start(); + } + + public void doStop() throws Exception { + if (shell != null) { + shell.stop(); + shell = null; + } + } + + public static final GBeanInfo GBEAN_INFO; + + static { + GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("Tomcat Web Container", TomcatContainer.class); + + infoFactory.setConstructor(new String[] { "ServerInfo", "CatalinaHome", "CatalinaBase", "CatalinaConfig" }); + + infoFactory.addReference("ServerInfo", ServerInfo.class); + infoFactory.addAttribute("CatalinaHome", String.class, true); + infoFactory.addAttribute("CatalinaBase", String.class, true); + infoFactory.addAttribute("CatalinaConfig", String.class, true); + GBEAN_INFO = infoFactory.getBeanInfo(); + } + + public static GBeanInfo getGBeanInfo() { + return GBEAN_INFO; + } } Deleted: /geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatGBean.java Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatGBean.java?view=auto&rev=106910 ============================================================================== Modified: geronimo/trunk/modules/tomcat/src/plan/tomcat-plan.xml Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/plan/tomcat-plan.xml?view=diff&rev=106911&p1=geronimo/trunk/modules/tomcat/src/plan/tomcat-plan.xml&r1=106910&p2=geronimo/trunk/modules/tomcat/src/plan/tomcat-plan.xml&r2=106911 ============================================================================== --- geronimo/trunk/modules/tomcat/src/plan/tomcat-plan.xml (original) +++ geronimo/trunk/modules/tomcat/src/plan/tomcat-plan.xml Mon Nov 29 06:41:11 2004 @@ -10,40 +10,37 @@ geronimo/jars/geronimo-tomcat-1.0-SNAPSHOT.jar - geronimo-spec/jars/geronimo-spec-j2ee-1.4-SNAPSHOT.jar + geronimo/jars/geronimo-system-1.0-SNAPSHOT.jar - tomcat/jars/catalina-5.0.28.jar + geronimo-spec/jars/geronimo-spec-j2ee-1.4-rc3.jar - tomcat/jars/jasper-compiler-5.0.28.jar + tomcat/jars/catalina-5.5.4.jar - tomcat/jars/jasper-runtime-5.0.28.jar + tomcat/jars/jasper-compiler-5.5.4.jar - tomcat/jars/tomcat-coyote-5.0.28.jar + tomcat/jars/jasper-runtime-5.5.4.jar - tomcat/jars/tomcat-http11-5.0.28.jar + tomcat/jars/tomcat-coyote-5.5.4.jar - tomcat/jars/tomcat-util-5.0.28.jar + tomcat/jars/tomcat-http-5.5.4.jar - tomcat/jars/naming-common-5.0.28.jar + tomcat/jars/tomcat-util-5.5.4.jar - tomcat/jars/naming-resources-5.0.28.jar + tomcat/jars/naming-resources-5.5.4.jar - tomcat/jars/servlets-common-5.0.28.jar + tomcat/jars/servlets-default-5.5.4.jar - tomcat/jars/servlets-default-5.0.28.jar - - - tomcat/jars/servlets-invoker-5.0.28.jar + tomcat/jars/servlets-invoker-5.5.4.jar commons-beanutils/jars/commons-beanutils-1.6.1.jar @@ -66,8 +63,13 @@ mx4j/jars/mx4j-2.0.1.jar + + + xerces/jars/xercesImpl-2.6.0.jar + - + + geronimo.system:role=ServerInfo var/catalina var/catalina conf/server.xml Modified: geronimo/trunk/modules/tomcat/src/var/server.xml Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/var/server.xml?view=diff&rev=106911&p1=geronimo/trunk/modules/tomcat/src/var/server.xml&r1=106910&p2=geronimo/trunk/modules/tomcat/src/var/server.xml&r2=106911 ============================================================================== --- geronimo/trunk/modules/tomcat/src/var/server.xml (original) +++ geronimo/trunk/modules/tomcat/src/var/server.xml Mon Nov 29 06:41:11 2004 @@ -1,22 +1,9 @@ - + - - - - - - +