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/01/29 04:47:31 UTC
cvs commit: jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/session FileStore.java LocalStrings.properties StandardManager.java
craigmcc 00/01/28 19:47:31
Modified: proposals/catalina/src/share/org/apache/tomcat
Lifecycle.java LifecycleException.java Wrapper.java
proposals/catalina/src/share/org/apache/tomcat/core
ContainerBase.java InterceptorValve.java
LocalStrings.properties StandardResources.java
proposals/catalina/src/share/org/apache/tomcat/logger
FileLogger.java LocalStrings.properties
proposals/catalina/src/share/org/apache/tomcat/security
LocalStrings.properties SecurityInterceptor.java
proposals/catalina/src/share/org/apache/tomcat/session
FileStore.java LocalStrings.properties
StandardManager.java
Log:
Remove configure() -- and therefore any reference to the DOM interfaces --
from the Lifecycle interface, and from all component implementation
classes that implement Lifecycle. This will be replaced by expanded
property getter/setter methods, including property change notification
support as described in the JavaBeans specification.
Revision Changes Path
1.2 +6 -33 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Lifecycle.java
Index: Lifecycle.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Lifecycle.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Lifecycle.java 2000/01/20 06:32:51 1.1
+++ Lifecycle.java 2000/01/29 03:47:28 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Lifecycle.java,v 1.1 2000/01/20 06:32:51 craigmcc Exp $
- * $Revision: 1.1 $
- * $Date: 2000/01/20 06:32:51 $
+ * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Lifecycle.java,v 1.2 2000/01/29 03:47:28 craigmcc Exp $
+ * $Revision: 1.2 $
+ * $Date: 2000/01/29 03:47:28 $
*
* ====================================================================
*
@@ -65,19 +65,14 @@
package org.apache.tomcat;
-import org.w3c.dom.Node;
-
-
/**
* Common interface for component life cycle methods. Tomcat components
* may, but are not required to, implement this interface (as well as the
* appropriate interface(s) for the functionality they support) in order to
- * provide a consistent mechanism to configure, start, and stop the component.
- * <p>
- * <b>FIXME: Consider using the Avalon framework architecture instead.</b>
+ * provide a consistent mechanism to start and stop the component.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.1 $ $Date: 2000/01/20 06:32:51 $
+ * @version $Revision: 1.2 $ $Date: 2000/01/29 03:47:28 $
*/
public interface Lifecycle {
@@ -88,30 +83,10 @@
/**
- * Configure this component, based on the specified configuration
- * parameters. This method should be called immediately after the
- * component instance is created, and before <code>start()</code>
- * is called.
- *
- * @param parameters Configuration parameters for this component
- * (<B>FIXME: What object type should this really be?)
- *
- * @exception IllegalStateException if this component has already been
- * configured and/or started
- * @exception LifecycleException if this component detects a fatal error
- * in the configuration parameters it was given
- */
- public void configure(Node parameters)
- throws LifecycleException;
-
-
- /**
* Prepare for the beginning of active use of the public methods of this
- * component. This method should be called after <code>configure()</code>,
- * and before any of the public methods of the component are utilized.
+ * component. This method should be called before any of the public
+ * methods of this component are utilized.
*
- * @exception IllegalStateException if this component has not yet been
- * configured (if required for this component)
* @exception IllegalStateException if this component has already been
* started
* @exception LifecycleException if this component detects a fatal error
@@ -126,8 +101,6 @@
* instance of this component.
*
* @exception IllegalStateException if this component has not been started
- * @exception IllegalStateException if this component has already
- * been stopped
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
1.2 +3 -5 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/LifecycleException.java
Index: LifecycleException.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/LifecycleException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LifecycleException.java 2000/01/20 06:32:51 1.1
+++ LifecycleException.java 2000/01/29 03:47:28 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/LifecycleException.java,v 1.1 2000/01/20 06:32:51 craigmcc Exp $
- * $Revision: 1.1 $
- * $Date: 2000/01/20 06:32:51 $
+ * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/LifecycleException.java,v 1.2 2000/01/29 03:47:28 craigmcc Exp $
+ * $Revision: 1.2 $
+ * $Date: 2000/01/29 03:47:28 $
*
* ====================================================================
*
@@ -69,11 +69,9 @@
* General purpose exception that is thrown to indicate a lifecycle related
* problem. Such exceptions should generally be considered fatal to the
* operation of the application containing this component.
- * <p>
- * <b>FIXME: Consider using the Avalon framework architecture instead.</b>
*
* @author Craig R. McClanahan
- * @version $Revision: 1.1 $ $Date: 2000/01/20 06:32:51 $
+ * @version $Revision: 1.2 $ $Date: 2000/01/29 03:47:28 $
*/
public final class LifecycleException extends Exception {
1.2 +3 -17 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Wrapper.java
Index: Wrapper.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Wrapper.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Wrapper.java 2000/01/20 06:33:39 1.1
+++ Wrapper.java 2000/01/29 03:47:28 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Wrapper.java,v 1.1 2000/01/20 06:33:39 craigmcc Exp $
- * $Revision: 1.1 $
- * $Date: 2000/01/20 06:33:39 $
+ * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/Wrapper.java,v 1.2 2000/01/29 03:47:28 craigmcc Exp $
+ * $Revision: 1.2 $
+ * $Date: 2000/01/29 03:47:28 $
*
* ====================================================================
*
@@ -89,27 +89,13 @@
* <code>IllegalArgumentException</code>.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.1 $ $Date: 2000/01/20 06:33:39 $
+ * @version $Revision: 1.2 $ $Date: 2000/01/29 03:47:28 $
*/
public interface Wrapper extends Container {
// ------------------------------------------------------------- Properties
-
-
- /**
- * Return the servlet configuration definitions for this servlet.
- */
- public WrapperConfig getConfiguration();
-
-
- /**
- * Set the servlet configuration definitions for this servlet.
- *
- * @param config The new servlet configuration definitions
- */
- public void setConfiguration(WrapperConfig config);
// --------------------------------------------------------- Public Methods
1.4 +4 -17 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.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ContainerBase.java 2000/01/24 08:31:31 1.3
+++ ContainerBase.java 2000/01/29 03:47:28 1.4
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/ContainerBase.java,v 1.3 2000/01/24 08:31:31 craigmcc Exp $
- * $Revision: 1.3 $
- * $Date: 2000/01/24 08:31:31 $
+ * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/ContainerBase.java,v 1.4 2000/01/29 03:47:28 craigmcc Exp $
+ * $Revision: 1.4 $
+ * $Date: 2000/01/29 03:47:28 $
*
* ====================================================================
*
@@ -82,7 +82,6 @@
import org.apache.tomcat.Response;
import org.apache.tomcat.Valve;
import org.apache.tomcat.util.StringManager;
-import org.w3c.dom.Node;
/**
@@ -98,7 +97,7 @@
* pipeline will preceed the basic Valve.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.3 $ $Date: 2000/01/24 08:31:31 $
+ * @version $Revision: 1.4 $ $Date: 2000/01/29 03:47:28 $
*/
public abstract class ContainerBase
@@ -547,18 +546,6 @@
// ------------------------------------------------------ Lifecycle Methods
-
-
- /**
- * Configure this object.
- *
- * @param parameters Configuration parameters for this component
- */
- public void configure(Node parameters) throws LifecycleException {
-
- ; // FIXME - Placeholder for new configuration design pattern
-
- }
/**
1.2 +4 -48 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/InterceptorValve.java
Index: InterceptorValve.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/InterceptorValve.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- InterceptorValve.java 2000/01/24 08:31:31 1.1
+++ InterceptorValve.java 2000/01/29 03:47:28 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/InterceptorValve.java,v 1.1 2000/01/24 08:31:31 craigmcc Exp $
- * $Revision: 1.1 $
- * $Date: 2000/01/24 08:31:31 $
+ * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/InterceptorValve.java,v 1.2 2000/01/29 03:47:28 craigmcc Exp $
+ * $Revision: 1.2 $
+ * $Date: 2000/01/29 03:47:28 $
*
* ====================================================================
*
@@ -77,7 +77,6 @@
import org.apache.tomcat.Response;
import org.apache.tomcat.Valve;
import org.apache.tomcat.util.StringManager;
-import org.w3c.dom.Node;
/**
@@ -99,7 +98,7 @@
* <ul>
*
* @author Craig R. McClanahan
- * @version $Revision: 1.1 $ $Date: 2000/01/24 08:31:31 $
+ * @version $Revision: 1.2 $ $Date: 2000/01/29 03:47:28 $
*/
public final class InterceptorValve
@@ -110,12 +109,6 @@
/**
- * Has this component been configured yet?
- */
- private boolean configured = false;
-
-
- /**
* The Container with which this Valve is associated.
*/
private Container container = null;
@@ -392,42 +385,10 @@
/**
- * Configure this component, based on the specified configuration
- * parameters. This method should be called immediately after the
- * component instance is created, and before <code>start()</code>
- * is called.
- *
- * @param parameters Configuration parameters for this component
- * (<B>FIXME: What object type should this really be?)
- *
- * @exception IllegalStateException if this component has already been
- * configured and/or started
- * @exception LifecycleException if this component detects a fatal error
- * in the configuration parameters it was given
- */
- public void configure(Node parameters)
- throws LifecycleException {
-
- // Validate and update our current component state
- if (configured)
- throw new LifecycleException
- (sm.getString("interceptorValve.alreadyConfigured"));
- configured = true;
- if (parameters == null)
- return;
-
- ; // FIXME: replace by selected configuration design pattern
-
- }
-
-
- /**
* Prepare for the beginning of active use of the public methods of this
* component. This method should be called after <code>configure()</code>,
* and before any of the public methods of the component are utilized.
*
- * @exception IllegalStateException if this component has not yet been
- * configured (if required for this component)
* @exception IllegalStateException if this component has already been
* started
* @exception LifecycleException if this component detects a fatal error
@@ -436,9 +397,6 @@
public void start() throws LifecycleException {
// Validate and update our current component state
- if (!configured)
- throw new LifecycleException
- (sm.getString("interceptorValve.notConfigured"));
if (started)
throw new LifecycleException
(sm.getString("interceptorValve.alreadyStarted"));
@@ -461,8 +419,6 @@
* instance of this component.
*
* @exception IllegalStateException if this component has not been started
- * @exception IllegalStateException if this component has already
- * been stopped
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
1.3 +0 -9 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.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LocalStrings.properties 2000/01/24 08:31:31 1.2
+++ LocalStrings.properties 2000/01/29 03:47:29 1.3
@@ -1,28 +1,19 @@
containerBase.alreadyStarted=Container has already been started
-containerBase.notConfigured=No default Valve configured for this Container
containerBase.notStarted=Container has not been started
-interceptorValve.alreadyConfigured=InterceptorValve has already been configured
interceptorValve.alreadyStarted=InterceptorValve has already been started
-interceptorValve.notConfigured=InterceptorValve has not yet been configured
interceptorValve.notStarted=InterceptorValve has not yet been started
-standardContext.alreadyConfigured=Context has already been configured
standardContext.alreadyStarted=Context has already been started
-standardContext.notConfigured=Context has not yet been configured
standardContext.notStarted=Context has not yet been started
standardContext.notWrapper=Child of a Context must be a Wrapper
-standardEngine.alreadyConfigured=Engine has already been configured
standardEngine.alreadyStarted=Engine has already been started
-standardEngine.notConfigured=Engine has not yet been configured
standardEngine.notHost=Child of an Engine must be a Host
standardEngine.notParent=Engine cannot have a parent Container
standardEngine.notStarted=Engine has not yet been started
standardEngine.unfoundHost=Virtual host $0 not found
standardEngine.unknownHost=No server host specified in this request
-standardHost.alreadyConfigured=Host has already been configured
standardHost.alreadyStarted=Host has already been started
standardHost.noContext=No Context configured to process this request
standardHost.noHost=No Host configured to process this request
-standardHost.notConfigured=Host has not yet been configured
standardHost.notContext=Child of a Host must be a Context
standardHost.notStarted=Host has not yet been started
standardHost.nullName=Host name is required
1.2 +3 -74 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/StandardResources.java
Index: StandardResources.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/StandardResources.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StandardResources.java 2000/01/20 06:35:26 1.1
+++ StandardResources.java 2000/01/29 03:47:29 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/StandardResources.java,v 1.1 2000/01/20 06:35:26 craigmcc Exp $
- * $Revision: 1.1 $
- * $Date: 2000/01/20 06:35:26 $
+ * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/core/StandardResources.java,v 1.2 2000/01/29 03:47:29 craigmcc Exp $
+ * $Revision: 1.2 $
+ * $Date: 2000/01/29 03:47:29 $
*
* ====================================================================
*
@@ -77,30 +77,14 @@
import org.apache.tomcat.Resources;
import org.apache.tomcat.util.StringManager;
import org.apache.tomcat.util.URLUtil;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
/**
* Standard implementation of the <b>Resources</b> interface. Resource
* requests are resolved against the document base URL that is configured.
- * <p>
- * Lifecycle configuration of this component assumes an XML node
- * in the following format:
- * <code>
- * <Resources className="org.apache.tomcat.core.StandardResources"
- * docRoot="webpages"/>
- * </code>
- * where you can adjust the following parameters, with default values
- * in square brackets:
- * <ul>
- * <li><b>docRoot</b> - Directory name, directory path, or base URL from
- * which this component can derive URLs of desired resources.
- * [webpages]
- * </ul>
*
* @author Craig R. McClanahan
- * @version $Revision: 1.1 $ $Date: 2000/01/20 06:35:26 $
+ * @version $Revision: 1.2 $ $Date: 2000/01/29 03:47:29 $
*/
public final class StandardResources
@@ -125,12 +109,6 @@
/**
- * Has this component been configured?
- */
- private boolean configured = false;
-
-
- /**
* The Container this component is associated with.
*/
private Container container = null;
@@ -362,54 +340,10 @@
/**
- * Configure this component, based on the specified configuration
- * parameters. This method should be called immediately after the
- * component instance is created, and before <code>start()</code>
- * is called.
- *
- * @param parameters Configuration parameters for this component
- * (<B>FIXME: What object type should this really be?)
- *
- * @exception IllegalStateException if this component has already been
- * configured and/or started
- * @exception LifecycleException if this component detects a fatal error
- * in the configuration parameters it was given
- */
- public void configure(Node parameters)
- throws LifecycleException {
-
- // Validate and update our current component state
- if (configured)
- throw new LifecycleException
- (sm.getString("standardResources.alreadyConfigured"));
- configured = true;
- if (parameters == null)
- return;
-
- // Parse and process our configuration parameters
- if (!("Resources".equals(parameters.getNodeName())))
- return;
- NamedNodeMap attributes = parameters.getAttributes();
- Node node = null;
- String value = null;
-
- node = attributes.getNamedItem("docRoot");
- if (node != null) {
- value = node.getNodeValue();
- if (value != null)
- setDocRoot(value);
- }
-
- }
-
-
- /**
* Prepare for the beginning of active use of the public methods of this
* component. This method should be called after <code>configure()</code>,
* and before any of the public methods of the component are utilized.
*
- * @exception IllegalStateException if this component has not yet been
- * configured (if required for this component)
* @exception IllegalStateException if this component has already been
* started
* @exception LifecycleException if this component detects a fatal error
@@ -418,9 +352,6 @@
public void start() throws LifecycleException {
// Validate and update our current component state
- if (!configured)
- throw new LifecycleException
- (sm.getString("standardResources.notConfigured"));
if (started)
throw new LifecycleException
(sm.getString("standardResources.alreadyStarted"));
@@ -435,8 +366,6 @@
* instance of this component.
*
* @exception IllegalStateException if this component has not been started
- * @exception IllegalStateException if this component has already
- * been stopped
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
1.2 +3 -107 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/logger/FileLogger.java
Index: FileLogger.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/logger/FileLogger.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FileLogger.java 2000/01/20 06:36:29 1.1
+++ FileLogger.java 2000/01/29 03:47:29 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/logger/FileLogger.java,v 1.1 2000/01/20 06:36:29 craigmcc Exp $
- * $Revision: 1.1 $
- * $Date: 2000/01/20 06:36:29 $
+ * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/logger/FileLogger.java,v 1.2 2000/01/29 03:47:29 craigmcc Exp $
+ * $Revision: 1.2 $
+ * $Date: 2000/01/29 03:47:29 $
*
* ====================================================================
*
@@ -81,29 +81,9 @@
* Implementation of <b>Logger</b> that appends log messages to a file
* named {prefix}.{date}.{suffix} in a configured directory, with an
* optional preceding timestamp.
- * <p>
- * Lifecycle configuration of this component assumes an XML node
- * in the following format:
- * <code>
- * <Logger className="org.apache.tomcat.logger.FileLogger"
- * directory="./LOG" prefix="tomcat." suffix=".log"
- * timestamp="false"/>
- * </code>
- * where you can adjust the following parameters, with default values
- * in square brackets:
- * <ul>
- * <li><b>directory</b> - Pathname of the directory in which log files are
- * created. [./LOG]
- * <li><b>prefix</b> - Prefix string added to the start of log file
- * pathnames. [tomcat.]
- * <li><b>suffix</b> - Suffix string added to the end of log file
- * pathnames. [.log]
- * <li><b>timestamp</b> - <code>true</code> if logged messages should be
- * date/time stamped, else <code>false</code>. [timestamp]
- * </ul>
*
* @author Craig R. McClanahan
- * @version $Revision: 1.1 $ $Date: 2000/01/20 06:36:29 $
+ * @version $Revision: 1.2 $ $Date: 2000/01/29 03:47:29 $
*/
public final class FileLogger
@@ -115,12 +95,6 @@
/**
- * Has this component been configured?
- */
- private boolean configured = false;
-
-
- /**
* The as-of date for the currently open log file, or a zero-length
* string if there is no open log file.
*/
@@ -349,83 +323,10 @@
/**
- * Configure this component, based on the specified configuration
- * parameters. This method should be called immediately after the
- * component instance is created, and before <code>start()</code>
- * is called.
- *
- * @param parameters Configuration parameters for this component
- * (<B>FIXME: What object type should this really be?)
- *
- * @exception IllegalStateException if this component has already been
- * configured and/or started
- * @exception LifecycleException if this component detects a fatal error
- * in the configuration parameters it was given
- */
- public void configure(Node parameters)
- throws LifecycleException {
-
- // Validate and update our current component state
- if (configured)
- throw new LifecycleException
- (sm.getString("fileLogger.alreadyConfigured"));
- configured = true;
- if (parameters == null)
- return;
-
- // Parse and process our configuration parameters
- if (!("Logger".equals(parameters.getNodeName())))
- return;
- NamedNodeMap attributes = parameters.getAttributes();
- Node node = null;
-
- node = attributes.getNamedItem("directory");
- if (node != null) {
- try {
- setDirectory(node.getNodeValue());
- } catch (Throwable t) {
- ; // XXX - Throw exception?
- }
- }
-
- node = attributes.getNamedItem("prefix");
- if (node != null) {
- try {
- setPrefix(node.getNodeValue());
- } catch (Throwable t) {
- ; // XXX - Throw exception?
- }
- }
-
- node = attributes.getNamedItem("suffix");
- if (node != null) {
- try {
- setSuffix(node.getNodeValue());
- } catch (Throwable t) {
- ; // XXX - Throw exception?
- }
- }
-
- node = attributes.getNamedItem("timestamp");
- if (node != null) {
- try {
- String value = node.getNodeValue().toLowerCase();
- setTimestamp(value.equals("true"));
- } catch (Throwable t) {
- ; // XXX - Throw exception?
- }
- }
-
- }
-
-
- /**
* Prepare for the beginning of active use of the public methods of this
* component. This method should be called after <code>configure()</code>,
* and before any of the public methods of the component are utilized.
*
- * @exception IllegalStateException if this component has not yet been
- * configured (if required for this component)
* @exception IllegalStateException if this component has already been
* started
* @exception LifecycleException if this component detects a fatal error
@@ -434,9 +335,6 @@
public void start() throws LifecycleException {
// Validate and update our current component state
- if (!configured)
- throw new LifecycleException
- (sm.getString("fileLogger.notConfigured"));
if (started)
throw new LifecycleException
(sm.getString("fileLogger.alreadyStarted"));
@@ -451,8 +349,6 @@
* instance of this component.
*
* @exception IllegalStateException if this component has not been started
- * @exception IllegalStateException if this component has already
- * been stopped
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
1.2 +0 -2 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/logger/LocalStrings.properties
Index: LocalStrings.properties
===================================================================
RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/logger/LocalStrings.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LocalStrings.properties 2000/01/20 06:36:29 1.1
+++ LocalStrings.properties 2000/01/29 03:47:29 1.2
@@ -1,4 +1,2 @@
-fileLogger.alreadyConfigured=File Logger has already been configured
fileLogger.alreadyStarted=File Logger has already been started
-fileLogger.notConfigured=File Logger has not yet been configured
fileLogger.notStarted=File Logger has not yet been started
1.2 +0 -2 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/security/LocalStrings.properties
Index: LocalStrings.properties
===================================================================
RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/security/LocalStrings.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LocalStrings.properties 2000/01/20 06:38:07 1.1
+++ LocalStrings.properties 2000/01/29 03:47:30 1.2
@@ -1,9 +1,7 @@
-securityInterceptor.alreadyConfigured=Security Interceptor has already been configured
securityInterceptor.alreadyStarted=Security Interceptor has already been started
securityInterceptor.forbidden=Access to the requested resource has been denied
securityInterceptor.missingMethod=No authentication method configured for this application
securityInterceptor.notContext=Configuration error: Must be attached to a Context
-securityInterceptor.notConfigured=Security Interceptor has not yet been configured
securityInterceptor.notStarted=Security Interceptor has not yet been started
securityInterceptor.unknownMethod=Unknown authentication method $0 configured for this application
securityInterceptor.userDataConstraint=This request violates a User Data constraint for this application
1.4 +4 -49 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/security/SecurityInterceptor.java
Index: SecurityInterceptor.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/security/SecurityInterceptor.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SecurityInterceptor.java 2000/01/24 08:31:32 1.3
+++ SecurityInterceptor.java 2000/01/29 03:47:30 1.4
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/security/SecurityInterceptor.java,v 1.3 2000/01/24 08:31:32 craigmcc Exp $
- * $Revision: 1.3 $
- * $Date: 2000/01/24 08:31:32 $
+ * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/security/SecurityInterceptor.java,v 1.4 2000/01/29 03:47:30 craigmcc Exp $
+ * $Revision: 1.4 $
+ * $Date: 2000/01/29 03:47:30 $
*
* ====================================================================
*
@@ -88,8 +88,6 @@
import org.apache.tomcat.deployment.WebApplicationDescriptor;
import org.apache.tomcat.deployment.WebResourceCollection;
import org.apache.tomcat.util.StringManager;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
/**
@@ -114,7 +112,7 @@
* </ul>
*
* @author Craig R. McClanahan
- * @version $Revision: 1.3 $ $Date: 2000/01/24 08:31:32 $
+ * @version $Revision: 1.4 $ $Date: 2000/01/29 03:47:30 $
*/
@@ -126,12 +124,6 @@
/**
- * Has this component been configured?
- */
- private boolean configured = false;
-
-
- /**
* The Context to which this Interceptor is attached.
*/
private Context context = null;
@@ -534,42 +526,10 @@
/**
- * Configure this component, based on the specified configuration
- * parameters. This method should be called immediately after the
- * component instance is created, and before <code>start()</code>
- * is called.
- *
- * @param parameters Configuration parameters for this component
- * (<B>FIXME: What object type should this really be?)
- *
- * @exception IllegalStateException if this component has already been
- * configured and/or started
- * @exception LifecycleException if this component detects a fatal error
- * in the configuration parameters it was given
- */
- public void configure(Node parameters)
- throws LifecycleException {
-
- // Validate and update our current component state
- if (configured)
- throw new LifecycleException
- (sm.getString("securityInterceptor.alreadyConfigured"));
- configured = true;
- if (parameters == null)
- return;
-
- // Parse and process our configuration parameters
-
- }
-
-
- /**
* Prepare for the beginning of active use of the public methods of this
* component. This method should be called after <code>configure()</code>,
* and before any of the public methods of the component are utilized.
*
- * @exception IllegalStateException if this component has not yet been
- * configured (if required for this component)
* @exception IllegalStateException if this component has already been
* started
* @exception LifecycleException if this component detects a fatal error
@@ -578,9 +538,6 @@
public void start() throws LifecycleException {
// Validate and update our current component state
- if (!configured)
- throw new LifecycleException
- (sm.getString("securityInterceptor.notConfigured"));
if (started)
throw new LifecycleException
(sm.getString("securityInterceptor.alreadyStarted"));
@@ -595,8 +552,6 @@
* instance of this component.
*
* @exception IllegalStateException if this component has not been started
- * @exception IllegalStateException if this component has already
- * been stopped
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
1.2 +3 -85 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/session/FileStore.java
Index: FileStore.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/session/FileStore.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FileStore.java 2000/01/20 06:37:30 1.1
+++ FileStore.java 2000/01/29 03:47:30 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/session/FileStore.java,v 1.1 2000/01/20 06:37:30 craigmcc Exp $
- * $Revision: 1.1 $
- * $Date: 2000/01/20 06:37:30 $
+ * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/session/FileStore.java,v 1.2 2000/01/29 03:47:30 craigmcc Exp $
+ * $Revision: 1.2 $
+ * $Date: 2000/01/29 03:47:30 $
*
* ====================================================================
*
@@ -83,32 +83,15 @@
import org.apache.tomcat.Session;
import org.apache.tomcat.Store;
import org.apache.tomcat.util.StringManager;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
/**
* Concrete implementation of the <b>Store</b> interface that utilizes
* a file per saved Session in a configured directory. Sessions that are
* saved are still subject to being expired based on inactivity.
- * <p>
- * Lifecycle configuration of this component assumes an XML node
- * in the following format:
- * <code>
- * <Store className="org.apache.tomcat.session.FileStore"
- * checkInterval="60" directoryPath="./STORE" />
- * </code>
- * where you can adjust the following parameters, with default values
- * in square brackets:
- * <ul>
- * <li><b>checkInterval</b> - The interval (in seconds) between background
- * thread checks for expired sessions. [60]
- * <li><b>directoryPath</b> - Pathname of the directory in which saved
- * Sessions are stored. [./STORE]
- * </ul>
*
* @author Craig R. McClanahan
- * @version $Revision: 1.1 $ $Date: 2000/01/20 06:37:30 $
+ * @version $Revision: 1.2 $ $Date: 2000/01/29 03:47:30 $
*/
public final class FileStore
@@ -126,12 +109,6 @@
/**
- * Has this component been configured yet?
- */
- private boolean configured = false;
-
-
- /**
* The pathname of the directory in which Sessions are stored.
*/
private String directoryPath = "./STORE";
@@ -315,64 +292,10 @@
/**
- * Configure this component, based on the specified configuration
- * parameters. This method should be called immediately after the
- * component instance is created, and before <code>start()</code>
- * is called.
- *
- * @param parameters Configuration parameters for this component
- * (<B>FIXME: What object type should this really be?)
- *
- * @exception IllegalStateException if this component has already been
- * configured and/or started
- * @exception LifecycleException if this component detects a fatal error
- * in the configuration parameters it was given
- */
- public void configure(Node parameters)
- throws LifecycleException {
-
- // Validate and update our current component state
- if (configured)
- throw new LifecycleException
- (sm.getString("fileStore.alreadyConfigured"));
- configured = true;
- if (parameters == null)
- return;
-
- // Parse and process our configuration parameters
- if (!("Store".equals(parameters.getNodeName())))
- return;
- NamedNodeMap attributes = parameters.getAttributes();
- Node node = null;
-
- node = attributes.getNamedItem("checkInterval");
- if (node != null) {
- try {
- setCheckInterval(Integer.parseInt(node.getNodeValue()));
- } catch (Throwable t) {
- ; // XXX - Throw exception?
- }
- }
-
- node = attributes.getNamedItem("directoryPath");
- if (node != null) {
- try {
- setDirectoryPath(node.getNodeValue());
- } catch (Throwable t) {
- ; // XXX - Throw exception?
- }
- }
-
- }
-
-
- /**
* Prepare for the beginning of active use of the public methods of this
* component. This method should be called after <code>configure()</code>,
* and before any of the public methods of the component are utilized.
*
- * @exception IllegalStateException if this component has not yet been
- * configured (if required for this component)
* @exception IllegalStateException if this component has already been
* started
* @exception LifecycleException if this component detects a fatal error
@@ -381,9 +304,6 @@
public void start() throws LifecycleException {
// Validate and update our current component state
- if (!configured)
- throw new LifecycleException
- (sm.getString("fileStore.notConfigured"));
if (started)
throw new LifecycleException
(sm.getString("fileStore.alreadyStarted"));
@@ -401,8 +321,6 @@
* instance of this component.
*
* @exception IllegalStateException if this component has not been started
- * @exception IllegalStateException if this component has already
- * been stopped
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/
1.2 +0 -4 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/session/LocalStrings.properties
Index: LocalStrings.properties
===================================================================
RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/session/LocalStrings.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LocalStrings.properties 2000/01/20 06:37:30 1.1
+++ LocalStrings.properties 2000/01/29 03:47:30 1.2
@@ -1,14 +1,10 @@
applicationSession.session.ise=invalid session state
applicationSession.value.iae=null value
-fileStore.alreadyConfigured=File Store has already been configured
fileStore.alreadyStarted=File Store has already been started
-fileStore.notConfigured=File Store has not yet been configured
fileStore.notStarted=File Store has not yet been started
serverSession.value.iae=null value
-standardManager.alreadyConfigured=Manager has already been configured
standardManager.alreadyStarted=Manager has already been started
standardManager.createSession.ise=createSession: Too many active sessions
-standardManager.notConfigured=Manager has not yet been configured
standardManager.notStarted=Manager has not yet been started
standardSession.invalidate.ise=invalidate: Session already invalidated
standardSession.isNew.ise=isNew: Session already invalidated
1.2 +3 -100 jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/session/StandardManager.java
Index: StandardManager.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/session/StandardManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StandardManager.java 2000/01/20 06:37:30 1.1
+++ StandardManager.java 2000/01/29 03:47:30 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/session/StandardManager.java,v 1.1 2000/01/20 06:37:30 craigmcc Exp $
- * $Revision: 1.1 $
- * $Date: 2000/01/20 06:37:30 $
+ * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/session/StandardManager.java,v 1.2 2000/01/29 03:47:30 craigmcc Exp $
+ * $Revision: 1.2 $
+ * $Date: 2000/01/29 03:47:30 $
*
* ====================================================================
*
@@ -76,38 +76,15 @@
import org.apache.tomcat.Request;
import org.apache.tomcat.Session;
import org.apache.tomcat.util.StringManager;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
/**
* Standard implementation of the <b>Manager</b> interface that provides
* no session persistence or distributable capabilities, but does support
* an optional, configurable, maximum number of active sessions allowed.
- * <p>
- * Lifecycle configuration of this component assumes an XML node
- * in the following format:
- * <code>
- * <Manager className="org.apache.tomcat.session.StandardManager"
- * checkInterval="60" maxActiveSessions="-1"
- * maxInactiveInterval="-1" />
- * </code>
- * where you can adjust the following parameters, with default values
- * in square brackets:
- * <ul>
- * <li><b>checkInterval</b> - The interval (in seconds) between background
- * thread checks for expired sessions. [60]
- * <li><b>maxActiveSessions</b> - The maximum number of sessions allowed to
- * be active at once, or -1 for no limit. [-1]
- * <li><b>maxInactiveInterval</b> - The default maximum number of seconds of
- * inactivity before which the servlet container is allowed to time out
- * a session, or -1 for no limit. This value should be overridden from
- * the default session timeout specified in the web application deployment
- * descriptor, if any. [-1]
- * </ul>
*
* @author Craig R. McClanahan
- * @version $Revision: 1.1 $ $Date: 2000/01/20 06:37:30 $
+ * @version $Revision: 1.2 $ $Date: 2000/01/29 03:47:30 $
*/
public final class StandardManager
@@ -125,12 +102,6 @@
/**
- * Has this component been configured yet?
- */
- private boolean configured = false;
-
-
- /**
* The descriptive information about this implementation.
*/
private static final String info = "StandardManager/1.0";
@@ -263,73 +234,10 @@
/**
- * Configure this component, based on the specified configuration
- * parameters. This method should be called immediately after the
- * component instance is created, and before <code>start()</code>
- * is called.
- *
- * @param parameters Configuration parameters for this component
- * (<B>FIXME: What object type should this really be?)
- *
- * @exception IllegalStateException if this component has already been
- * configured and/or started
- * @exception LifecycleException if this component detects a fatal error
- * in the configuration parameters it was given
- */
- public void configure(Node parameters)
- throws LifecycleException {
-
- // Validate and update our current component state
- if (configured)
- throw new LifecycleException
- (sm.getString("standardManager.alreadyConfigured"));
- configured = true;
- if (parameters == null)
- return;
-
- // Parse and process our configuration parameters
- if (!("Manager".equals(parameters.getNodeName())))
- return;
- NamedNodeMap attributes = parameters.getAttributes();
- Node node = null;
-
- node = attributes.getNamedItem("checkInterval");
- if (node != null) {
- try {
- setCheckInterval(Integer.parseInt(node.getNodeValue()));
- } catch (Throwable t) {
- ; // XXX - Throw exception?
- }
- }
-
- node = attributes.getNamedItem("maxActiveSessions");
- if (node != null) {
- try {
- setMaxActiveSessions(Integer.parseInt(node.getNodeValue()));
- } catch (Throwable t) {
- ; // XXX - Throw exception?
- }
- }
-
- node = attributes.getNamedItem("maxInactiveInterval");
- if (node != null) {
- try {
- setMaxInactiveInterval(Integer.parseInt(node.getNodeValue()));
- } catch (Throwable t) {
- ; // XXX - Throw exception?
- }
- }
-
- }
-
-
- /**
* Prepare for the beginning of active use of the public methods of this
* component. This method should be called after <code>configure()</code>,
* and before any of the public methods of the component are utilized.
*
- * @exception IllegalStateException if this component has not yet been
- * configured (if required for this component)
* @exception IllegalStateException if this component has already been
* started
* @exception LifecycleException if this component detects a fatal error
@@ -338,9 +246,6 @@
public void start() throws LifecycleException {
// Validate and update our current component state
- if (!configured)
- throw new LifecycleException
- (sm.getString("standardManager.notConfigured"));
if (started)
throw new LifecycleException
(sm.getString("standardManager.alreadyStarted"));
@@ -358,8 +263,6 @@
* instance of this component.
*
* @exception IllegalStateException if this component has not been started
- * @exception IllegalStateException if this component has already
- * been stopped
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/