You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by cr...@locus.apache.org on 2000/04/17 04:34:35 UTC
cvs commit: jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/startup Catalina.java
craigmcc 00/04/16 19:34:35
Modified: proposals/catalina/src/conf server.xml
proposals/catalina/src/share/org/apache/tomcat/core
ContainerBase.java LocalStrings.properties
proposals/catalina/src/share/org/apache/tomcat/startup
Catalina.java
Added: proposals/catalina/src/share/org/apache/tomcat Server.java
proposals/catalina/src/share/org/apache/tomcat/core
StandardServer.java
Log:
Add a new "Server" interface defining an *optional* top level object that
can contain sets of Connectors and Containers.
Update the XmlMapper configuration in Catalina.java to reflect the
presence of the <Server> outer element.
Add support for a new <Lifecycle> subelement to each defined component to
allow the declaration of LifecycleListeners assocaited with that
component. A LifecycleListener is notified about start() and stop() calls
to the underlying component, and therefore serves a similar role to that
of ContextInterceptor in Tomcat 3.x, but more generalized.
Update the formatting of the XmlMapper configuration for readability.
Revision Changes Path
1.3 +9 -7 jakarta-tomcat/proposals/catalina/src/conf/server.xml
Index: server.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/conf/server.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- server.xml 2000/04/14 05:27:05 1.2
+++ server.xml 2000/04/17 02:34:33 1.3
@@ -4,15 +4,17 @@
<Server adminPort="-1" workDir="work">
- <!--
- <Connector className="org.apache.tomcat.service.TcpEndpointConnector">
- <Parameter name="handler"
- value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
- <Parameter name="port" value="8007"/>
- </Connector>
- -->
+ <!-- Define all the connectors to associate with the following container -->
+ <Connector className="org.apache.tomcat.connector.http.HttpConnector"
+ acceptCount="10" maxProcessors="20" port="8080"/>
+
+ <!-- Define the top level container in our container hierarchy -->
+
<Engine defaultHost="localhost" unknownHost="localhost">
+
+ <!-- Lifecycle listeners are notified of component start and stop -->
+ <!-- <Lifecycle className="....LifecycleListener...." param="value"/> -->
<!-- Because this Realm is here, an instance will be shared globally -->
<!--
1.1 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Server.java
Index: Server.java
===================================================================
/*
* $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Server.java,v 1.1 2000/04/17 02:34:34 craigmcc Exp $
* $Revision: 1.1 $
* $Date: 2000/04/17 02:34:34 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
* [Additional notices, if required by prior licensing conditions]
*
*/
package org.apache.tomcat;
/**
* A <b>Server</b> represents one convenient way to package a set of
* <code>Connectors</code> associated with a particular <code>Container</code>.
* You can have several many-to-one relationships (set of Connectors associated
* with one Container) by adding one or more Connectors first, followed by the
* corresponding Container, and then repeating this pattern.
* <p>
* This interface (and the corresonding implementation) exist to simplify
* configuring Tomcat from a <code>server.xml</code> file. It has no
* functional role once the server has been started.
* <p>
* Normally, an implementation of this interface will also implement
* <code>Lifecycle</code>, such that when the <code>start()</code> and
* <code>stop()</code> methods are called, all of the defined Containers
* and Connectors are also started or stopped.
*
* @author Craig R. McClanahan
* @version $Revision: 1.1 $ $Date: 2000/04/17 02:34:34 $
*/
public interface Server {
// --------------------------------------------------------- Public Methods
/**
* Add a new Connector to the set of defined Connectors. The newly
* added Connector will have no associated Container until a later call
* to <code>addContainer()</code> is made.
*
* @param connector The connector to be added
*/
public void addConnector(Connector connector);
/**
* Add a new Container to the set of defined Containers, and assign this
* Container to all defined Connectors that have not yet been associated
* with a Container will be associated with this one.
*
* @param container The container to be added
*
* @exception IllegalStateException if there are no unassociated
* Connectors to associate with (implying calls out of order)
*/
public void addContainer(Container container);
/**
* Return descriptive information about this Server implementation and
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
public String getInfo();
}
1.10 +5 -5 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/ContainerBase.java
Index: ContainerBase.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/ContainerBase.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ContainerBase.java 2000/04/10 20:01:37 1.9
+++ ContainerBase.java 2000/04/17 02:34:34 1.10
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/ContainerBase.java,v 1.9 2000/04/10 20:01:37 craigmcc Exp $
- * $Revision: 1.9 $
- * $Date: 2000/04/10 20:01:37 $
+ * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/ContainerBase.java,v 1.10 2000/04/17 02:34:34 craigmcc Exp $
+ * $Revision: 1.10 $
+ * $Date: 2000/04/17 02:34:34 $
*
* ====================================================================
*
@@ -149,7 +149,7 @@
* class comments of the implementation class.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.9 $ $Date: 2000/04/10 20:01:37 $
+ * @version $Revision: 1.10 $ $Date: 2000/04/17 02:34:34 $
*/
public abstract class ContainerBase
@@ -234,7 +234,7 @@
/**
* The string manager for this package.
*/
- protected StringManager sm =
+ protected static StringManager sm =
StringManager.getManager(Constants.Package);
1.7 +4 -0 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/LocalStrings.properties
Index: LocalStrings.properties
===================================================================
RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/LocalStrings.properties,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- LocalStrings.properties 2000/02/07 07:09:17 1.6
+++ LocalStrings.properties 2000/04/17 02:34:34 1.7
@@ -25,6 +25,10 @@
standardLoader.type=Repository $0 is not a supported file type
standardResources.malformedPath=Path must start with '/'
standardResources.malformedURL=Malformed URL
+standardServer.addContainer.ise=No connectors available to associate this container with
+standardServer.start.connectors=At least one connector is not associated with any container
+standardServer.start.started=This server has already been started
+standardServer.stop.notStarted=This server has not yet been started
standardWrapper.noChild=Wrapper cannot have a child Container
standardWrapper.noLoader=Wrapper cannot find the Loader to use
standardWrapper.noServlet=No servlet class has been configured
1.1 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/StandardServer.java
Index: StandardServer.java
===================================================================
/*
* $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/StandardServer.java,v 1.1 2000/04/17 02:34:34 craigmcc Exp $
* $Revision: 1.1 $
* $Date: 2000/04/17 02:34:34 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
* [Additional notices, if required by prior licensing conditions]
*
*/
package org.apache.tomcat.core;
import java.util.Enumeration;
import java.util.Vector;
import org.apache.tomcat.Connector;
import org.apache.tomcat.Container;
import org.apache.tomcat.Lifecycle;
import org.apache.tomcat.LifecycleEvent;
import org.apache.tomcat.LifecycleException;
import org.apache.tomcat.LifecycleListener;
import org.apache.tomcat.Server;
import org.apache.tomcat.util.LifecycleSupport;
import org.apache.tomcat.util.StringManager;
/**
* Standard implementation of the <b>Server</b> interface, available for use
* (but not required) when deploying and starting Tomcat.
*
* @author Craig R. McClanahan
* @version $Revision: 1.1 $ $Date: 2000/04/17 02:34:34 $
*/
public final class StandardServer
implements Lifecycle, Server {
// ----------------------------------------------------- Instance Variables
/**
* The set of Connectors associated with this Server.
*/
private Vector connectors = new Vector();
/**
* The set of Containers associated with this Server.
*/
private Vector containers = new Vector();
/**
* Descriptive information about this Server implementation.
*/
private static final String info =
"org.apache.tomcat.core.StandardServer/1.0";
/**
* The lifecycle event support for this component.
*/
private LifecycleSupport lifecycle = new LifecycleSupport(this);
/**
* The string manager for this package.
*/
private static StringManager sm =
StringManager.getManager(Constants.Package);
/**
* Has this component been started?
*/
private boolean started = false;
// --------------------------------------------------------- Server Methods
/**
* Add a new Connector to the set of defined Connectors. The newly
* added Connector will have no associated Container until a later call
* to <code>addContainer()</code> is made.
*
* @param connector The connector to be added
*/
public void addConnector(Connector connector) {
connector.setContainer(null);
connectors.addElement(connector);
}
/**
* Add a new Container to the set of defined Containers, and assign this
* Container to all defined Connectors that have not yet been associated
* with a Container will be associated with this one.
*
* @param container The container to be added
*
* @exception IllegalStateException if there are no unassociated
* Connectors to associate with (implying calls out of order)
*/
public void addContainer(Container container) {
containers.addElement(container);
int n = 0;
Enumeration conns = connectors.elements();
while (conns.hasMoreElements()) {
Connector conn = (Connector) conns.nextElement();
if (conn.getContainer() == null) {
conn.setContainer(container);
n++;
}
}
if (n == 0)
throw new IllegalStateException
(sm.getString("standardServer.addContainer.ise"));
}
/**
* Return descriptive information about this Server implementation and
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
public String getInfo() {
return (info);
}
// ------------------------------------------------------ Lifecycle Methods
/**
* Add a LifecycleEvent listener to this component.
*
* @param listener The listener to add
*/
public void addLifecycleListener(LifecycleListener listener) {
lifecycle.addLifecycleListener(listener);
}
/**
* Remove a LifecycleEvent listener from this component.
*
* @param listener The listener to remove
*/
public void removeLifecycleListener(LifecycleListener listener) {
lifecycle.removeLifecycleListener(listener);
}
/**
* Prepare for the beginning of active use of the public methods of this
* component. This method should be called before any of the public
* methods of this component are utilized. It should also send a
* LifecycleEvent of type START_EVENT to any registered listeners.
*
* @exception IllegalStateException if this component has already been
* started
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
public void start() throws LifecycleException {
// Validate and update our current component state
if (started)
throw new LifecycleException
(sm.getString("standardServer.start.started"));
int n = 0;
Enumeration conns = connectors.elements();
while (conns.hasMoreElements()) {
Connector conn = (Connector) conns.nextElement();
if (conn.getContainer() == null)
n++;
}
if (n == 0)
throw new LifecycleException
(sm.getString("standardServer.start.connectors"));
started = true;
lifecycle.fireLifecycleEvent(START_EVENT, null);
// Start our defined Containers first
Enumeration conts = containers.elements();
while (conts.hasMoreElements()) {
Container cont = (Container) conts.nextElement();
if (cont instanceof Lifecycle)
((Lifecycle) cont).start();
}
// Start our defined Connectors second
conns = connectors.elements();
while (conns.hasMoreElements()) {
Connector conn = (Connector) conns.nextElement();
if (conn instanceof Lifecycle)
((Lifecycle) conn).start();
}
}
/**
* Gracefully terminate the active use of the public methods of this
* component. This method should be the last one called on a given
* instance of this component. It should also send a LifecycleEvent
* of type STOP_EVENT to any registered listeners.
*
* @exception IllegalStateException if this component has not been started
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
public void stop() throws LifecycleException {
// Validate and update our current component state
if (!started)
throw new LifecycleException
(sm.getString("standardServer.stop.notStarted"));
started = false;
lifecycle.fireLifecycleEvent(STOP_EVENT, null);
// Stop our defined Connectors first
Enumeration conns = connectors.elements();
while (conns.hasMoreElements()) {
Connector conn = (Connector) conns.nextElement();
if (conn instanceof Lifecycle)
((Lifecycle) conn).stop();
}
// Stop our defined Containers second
Enumeration conts = containers.elements();
while (conts.hasMoreElements()) {
Container cont = (Container) conts.nextElement();
if (cont instanceof Lifecycle)
((Lifecycle) cont).stop();
}
}
}
1.2 +187 -88 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/startup/Catalina.java
Index: Catalina.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/startup/Catalina.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Catalina.java 2000/02/13 07:09:31 1.1
+++ Catalina.java 2000/04/17 02:34:34 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/startup/Catalina.java,v 1.1 2000/02/13 07:09:31 craigmcc Exp $
- * $Revision: 1.1 $
- * $Date: 2000/02/13 07:09:31 $
+ * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/startup/Catalina.java,v 1.2 2000/04/17 02:34:34 craigmcc Exp $
+ * $Revision: 1.2 $
+ * $Date: 2000/04/17 02:34:34 $
*
* ====================================================================
*
@@ -82,7 +82,7 @@
* </u>
*
* @author Craig R. McClanahan
- * @version $Revision: 1.1 $ $Date: 2000/02/13 07:09:31 $
+ * @version $Revision: 1.2 $ $Date: 2000/04/17 02:34:34 $
*/
public final class Catalina {
@@ -160,91 +160,190 @@
// Configure the actions we will be using
- ; // FIXME -- Adapter or Connector or something!
+ mapper.addRule("Server", mapper.objectCreate
+ ("org.apache.tomcat.core.StandardServer", "className"));
+ mapper.addRule("Server", mapper.setProperties());
+
+ mapper.addRule("Server/Connector", mapper.objectCreate
+ ("org.apache.tomcat.connector.http.HttpConnector",
+ "className"));
+ mapper.addRule("Server/Connector", mapper.setProperties());
+ mapper.addRule("Server/Connector", mapper.addChild
+ ("addConnector", "org.apache.tomcat.Connector"));
+
+ mapper.addRule("Server/Connector/Listener", mapper.objectCreate
+ (null, "className"));
+ mapper.addRule("Server/Connector/Listener", mapper.setProperties());
+ mapper.addRule("Server/Connector/Listener", mapper.addChild
+ ("addLifecycleListener",
+ "org.apache.tomcat.Lifecycle"));
+
+ mapper.addRule("Server/Engine", mapper.objectCreate
+ ("org.apache.tomcat.core.StandardEngine", "className"));
+ mapper.addRule("Server/Engine", mapper.setProperties());
+ mapper.addRule("Server/Engine", mapper.addChild
+ ("addContainer", "org.apache.tomcat.Container"));
+
+ mapper.addRule("Server/Engine/Host", mapper.objectCreate
+ ("org.apache.tomcat.core.StandardHost", "className"));
+ mapper.addRule("Server/Engine/Host", mapper.setProperties());
+ mapper.addRule("ServerEngine/Host", mapper.addChild
+ ("addChild", "org.apache.tomcat.Container"));
+
+ mapper.addRule("Server/Engine/Host/Context", mapper.objectCreate
+ ("org.apache.tomcat.core.StandardContext",
+ "className"));
+ mapper.addRule("Server/Engine/Host/Context", mapper.setProperties());
+ mapper.addRule("Server/Engine/Host/Context", mapper.addChild
+ ("addChild", "org.apache.tomcat.Container"));
+ ; // FIXME -- Process web.xml (with a LifecycleListener?) !!!
+
+ mapper.addRule("Server/Engine/Host/Context/Listener",
+ mapper.objectCreate
+ (null, "className"));
+ mapper.addRule("Server/Engine/Host/Context/Listener",
+ mapper.setProperties());
+ mapper.addRule("Server/Engine/Host/Context/Listener", mapper.addChild
+ ("addLifecycleListener",
+ "org.apache.tomcat.Lifecycle"));
+
+ mapper.addRule("Server/Engine/Host/Context/Loader",
+ mapper.objectCreate
+ ("org.apache.tomcat.core.StandardLoader", "className"));
+ mapper.addRule("Server/Engine/Host/Context/Loader",
+ mapper.setProperties());
+ mapper.addRule("Server/Engine/Host/Context/Loader", mapper.addChild
+ ("setLoader", "org.apache.tomcat.Loader"));
+
+ mapper.addRule("Server/Engine/Host/Context/Logger", mapper.objectCreate
+ (null, "className"));
+ mapper.addRule("Server/Engine/Host/Context/Logger",
+ mapper.setProperties());
+ mapper.addRule("Server/Engine/Host/Context/Logger", mapper.addChild
+ ("setLogger", "org.apache.tomcat.Logger"));
+
+ mapper.addRule("Server/Engine/Host/Context/Manager",
+ mapper.objectCreate
+ ("org.apache.tomcat.session.StandardManager",
+ "className"));
+ mapper.addRule("Server/Engine/Host/Context/Manager",
+ mapper.setProperties());
+ mapper.addRule("Server/Engine/Host/Context/Manager", mapper.addChild
+ ("setManager", "org.apache.tomcat.Manager"));
+
+ mapper.addRule("Server/Engine/Host/Context/Realm", mapper.objectCreate
+ (null, "className"));
+ mapper.addRule("Server/Engine/Host/Context/Realm",
+ mapper.setProperties());
+ mapper.addRule("Server/Engine/Host/Context/Realm", mapper.addChild
+ ("setRealm", "org.apache.tomcat.Realm"));
+
+ mapper.addRule("Server/Engine/Host/Context/Resources",
+ mapper.objectCreate
+ ("org.apache.tomcat.core.StandardResources",
+ "className"));
+ mapper.addRule("Server/Engine/Host/Context/Resources",
+ mapper.setProperties());
+ mapper.addRule("Server/Engine/Host/Context/Resources", mapper.addChild
+ ("setResources", "org.apache.tomcat.Resources"));
+
+ mapper.addRule("Server/Engine/Host/Context/Valve", mapper.objectCreate
+ (null, "className"));
+ mapper.addRule("Server/Engine/Host/Context/Valve",
+ mapper.setProperties());
+ mapper.addRule("Server/Engine/Host/Context/Valve", mapper.addChild
+ ("addValve", "org.apache.tomcat.Valve"));
+
+ mapper.addRule("Server/Engine/Host/Listener", mapper.objectCreate
+ (null, "className"));
+ mapper.addRule("Server/Engine/Host/Listener", mapper.setProperties());
+ mapper.addRule("Server/Engine/Host/Listener", mapper.addChild
+ ("addLifecycleListener",
+ "org.apache.tomcat.Lifecycle"));
+
+ mapper.addRule("Server/Engine/Host/Loader", mapper.objectCreate
+ ("org.apache.tomcat.core.StandardLoader", "className"));
+ mapper.addRule("Server/Engine/Host/Loader", mapper.setProperties());
+ mapper.addRule("Engine/Host/Loader", mapper.addChild
+ ("setLoader", "org.apache.tomcat.Loader"));
+
+ mapper.addRule("Server/Engine/Host/Logger", mapper.objectCreate
+ (null, "className"));
+ mapper.addRule("Server/Engine/Host/Logger", mapper.setProperties());
+ mapper.addRule("Server/Engine/Host/Logger", mapper.addChild
+ ("setLogger", "org.apache.tomcat.Logger"));
+
+ mapper.addRule("Server/Engine/Host/Manager", mapper.objectCreate
+ ("org.apache.tomcat.session.StandardManager",
+ "className"));
+ mapper.addRule("Server/Engine/Host/Manager", mapper.setProperties());
+ mapper.addRule("Server/Engine/Host/Manager", mapper.addChild
+ ("setManager", "org.apache.tomcat.Manager"));
+
+ mapper.addRule("Server/Engine/Host/Realm", mapper.objectCreate
+ (null, "className"));
+ mapper.addRule("Server/Engine/Host/Realm", mapper.setProperties());
+ mapper.addRule("Server/Engine/Host/Realm", mapper.addChild
+ ("setRealm", "org.apache.tomcat.Realm"));
+
+ mapper.addRule("Server/Engine/Host/Resources", mapper.objectCreate
+ ("org.apache.tomcat.core.StandardResources",
+ "className"));
+ mapper.addRule("Server/Engine/Host/Resources", mapper.setProperties());
+ mapper.addRule("Server/Engine/Host/Resources", mapper.addChild
+ ("setResources", "org.apache.tomcat.Resources"));
+
+ mapper.addRule("Server/Engine/Host/Valve", mapper.objectCreate
+ (null, "className"));
+ mapper.addRule("Server/Engine/Host/Valve", mapper.setProperties());
+ mapper.addRule("Server/Engine/Host/Valve", mapper.addChild
+ ("addValve", "org.apache.tomcat.Valve"));
+
+ mapper.addRule("Server/Engine/Listener", mapper.objectCreate
+ (null, "className"));
+ mapper.addRule("Server/Engine/Listener", mapper.setProperties());
+ mapper.addRule("Server/Engine/Listener", mapper.addChild
+ ("addLifecycleListener",
+ "org.apache.tomcat.Lifecycle"));
+
+ mapper.addRule("Server/Engine/Loader", mapper.objectCreate
+ ("org.apache.tomcat.core.StandardLoader", "className"));
+ mapper.addRule("Server/Engine/Loader", mapper.setProperties());
+ mapper.addRule("Server/Engine/Loader", mapper.addChild
+ ("setLoader", "org.apache.tomcat.Loader"));
+
+ mapper.addRule("Server/Engine/Logger", mapper.objectCreate
+ (null, "className"));
+ mapper.addRule("Server/Engine/Logger", mapper.setProperties());
+ mapper.addRule("Server/Engine/Logger", mapper.addChild
+ ("setLogger", "org.apache.tomcat.Logger"));
+
+ mapper.addRule("Server/Engine/Manager", mapper.objectCreate
+ ("org.apache.tomcat.session.StandardManager",
+ "className"));
+ mapper.addRule("Server/Engine/Manager", mapper.setProperties());
+ mapper.addRule("Server/Engine/Manager", mapper.addChild
+ ("setManager", "org.apache.tomcat.Manager"));
+
+ mapper.addRule("Server/Engine/Realm", mapper.objectCreate
+ (null, "className"));
+ mapper.addRule("Server/Engine/Realm", mapper.setProperties());
+ mapper.addRule("Server/Engine/Realm", mapper.addChild
+ ("setRealm", "org.apache.tomcat.Realm"));
+
+ mapper.addRule("Server/Engine/Resources", mapper.objectCreate
+ ("org.apache.tomcat.core.StandardResources",
+ "className"));
+ mapper.addRule("Server/Engine/Resources", mapper.setProperties());
+ mapper.addRule("Server/Engine/Resources", mapper.addChild
+ ("setResources", "org.apache.tomcat.Resources"));
+
+ mapper.addRule("Server/Engine/Valve", mapper.objectCreate
+ (null, "className"));
+ mapper.addRule("Server/Engine/Valve", mapper.setProperties());
+ mapper.addRule("Server/Engine/Valve", mapper.addChild
+ ("addValve", "org.apache.tomcat.Valve"));
- mapper.addRule("Engine", mapper.objectCreate("org.apache.tomcat.core.StandardEngine", "className"));
- mapper.addRule("Engine", mapper.setProperties());
-
- mapper.addRule("Engine/Host", mapper.objectCreate("org.apache.tomcat.core.StandardHost", "className"));
- mapper.addRule("Engine/Host", mapper.setProperties());
- mapper.addRule("Engine/Host", mapper.addChild("addChild", "org.apache.tomcat.Container"));
-
- mapper.addRule("Engine/Host/Context", mapper.objectCreate("org.apache.tomcat.core.StandardContext", "className"));
- mapper.addRule("Engine/Host/Context", mapper.setProperties());
- mapper.addRule("Engine/Host/Context", mapper.addChild("addChild", "org.apache.tomcat.Container"));
- ; // FIXME -- Process web.xml as well!!!
-
- mapper.addRule("Engine/Host/Context/Loader", mapper.objectCreate("org.apache.tomcat.core.StandardLoader", "className"));
- mapper.addRule("Engine/Host/Context/Loader", mapper.setProperties());
- mapper.addRule("Engine/Host/Context/Loader", mapper.addChild("setLoader", "org.apache.tomcat.Loader"));
-
- mapper.addRule("Engine/Host/Context/Logger", mapper.objectCreate(null, "className"));
- mapper.addRule("Engine/Host/Context/Logger", mapper.setProperties());
- mapper.addRule("Engine/Host/Context/Logger", mapper.addChild("setLogger", "org.apache.tomcat.Logger"));
-
- mapper.addRule("Engine/Host/Context/Manager", mapper.objectCreate("org.apache.tomcat.session.StandardManager", "className"));
- mapper.addRule("Engine/Host/Context/Manager", mapper.setProperties());
- mapper.addRule("Engine/Host/Context/Manager", mapper.addChild("setManager", "org.apache.tomcat.Manager"));
-
- mapper.addRule("Engine/Host/Context/Realm", mapper.objectCreate(null, "className"));
- mapper.addRule("Engine/Host/Context/Realm", mapper.setProperties());
- mapper.addRule("Engine/Host/Context/Realm", mapper.addChild("setRealm", "org.apache.tomcat.Realm"));
-
- mapper.addRule("Engine/Host/Context/Resources", mapper.objectCreate("org.apache.tomcat.core.StandardResources", "className"));
- mapper.addRule("Engine/Host/Context/Resources", mapper.setProperties());
- mapper.addRule("Engine/Host/Context/Resources", mapper.addChild("setResources", "org.apache.tomcat.Resources"));
-
- mapper.addRule("Engine/Host/Context/Valve", mapper.objectCreate(null, "className"));
- mapper.addRule("Engine/Host/Context/Valve", mapper.setProperties());
- mapper.addRule("Engine/Host/Context/Valve", mapper.addChild("addValve", "org.apache.tomcat.Valve"));
-
- mapper.addRule("Engine/Host/Loader", mapper.objectCreate("org.apache.tomcat.core.StandardLoader", "className"));
- mapper.addRule("Engine/Host/Loader", mapper.setProperties());
- mapper.addRule("Engine/Host/Loader", mapper.addChild("setLoader", "org.apache.tomcat.Loader"));
-
- mapper.addRule("Engine/Host/Logger", mapper.objectCreate(null, "className"));
- mapper.addRule("Engine/Host/Logger", mapper.setProperties());
- mapper.addRule("Engine/Host/Logger", mapper.addChild("setLogger", "org.apache.tomcat.Logger"));
-
- mapper.addRule("Engine/Host/Manager", mapper.objectCreate("org.apache.tomcat.session.StandardManager", "className"));
- mapper.addRule("Engine/Host/Manager", mapper.setProperties());
- mapper.addRule("Engine/Host/Manager", mapper.addChild("setManager", "org.apache.tomcat.Manager"));
-
- mapper.addRule("Engine/Host/Realm", mapper.objectCreate(null, "className"));
- mapper.addRule("Engine/Host/Realm", mapper.setProperties());
- mapper.addRule("Engine/Host/Realm", mapper.addChild("setRealm", "org.apache.tomcat.Realm"));
-
- mapper.addRule("Engine/Host/Resources", mapper.objectCreate("org.apache.tomcat.core.StandardResources", "className"));
- mapper.addRule("Engine/Host/Resources", mapper.setProperties());
- mapper.addRule("Engine/Host/Resources", mapper.addChild("setResources", "org.apache.tomcat.Resources"));
-
- mapper.addRule("Engine/Host/Valve", mapper.objectCreate(null, "className"));
- mapper.addRule("Engine/Host/Valve", mapper.setProperties());
- mapper.addRule("Engine/Host/Valve", mapper.addChild("addValve", "org.apache.tomcat.Valve"));
-
- mapper.addRule("Engine/Loader", mapper.objectCreate("org.apache.tomcat.core.StandardLoader", "className"));
- mapper.addRule("Engine/Loader", mapper.setProperties());
- mapper.addRule("Engine/Loader", mapper.addChild("setLoader", "org.apache.tomcat.Loader"));
-
- mapper.addRule("Engine/Logger", mapper.objectCreate(null, "className"));
- mapper.addRule("Engine/Logger", mapper.setProperties());
- mapper.addRule("Engine/Logger", mapper.addChild("setLogger", "org.apache.tomcat.Logger"));
-
- mapper.addRule("Engine/Manager", mapper.objectCreate("org.apache.tomcat.session.StandardManager", "className"));
- mapper.addRule("Engine/Manager", mapper.setProperties());
- mapper.addRule("Engine/Manager", mapper.addChild("setManager", "org.apache.tomcat.Manager"));
-
- mapper.addRule("Engine/Realm", mapper.objectCreate(null, "className"));
- mapper.addRule("Engine/Realm", mapper.setProperties());
- mapper.addRule("Engine/Realm", mapper.addChild("setRealm", "org.apache.tomcat.Realm"));
-
- mapper.addRule("Engine/Resources", mapper.objectCreate("org.apache.tomcat.core.StandardResources", "className"));
- mapper.addRule("Engine/Resources", mapper.setProperties());
- mapper.addRule("Engine/Resources", mapper.addChild("setResources", "org.apache.tomcat.Resources"));
-
- mapper.addRule("Engine/Valve", mapper.objectCreate(null, "className"));
- mapper.addRule("Engine/Valve", mapper.setProperties());
- mapper.addRule("Engine/Valve", mapper.addChild("addValve", "org.apache.tomcat.Valve"));
return (mapper);