craigmcc 01/11/02 12:34:48
Modified: catalina build.xml
catalina/src/share/org/apache/catalina/mbeans
mbeans-descriptors.xml
catalina/src/share/org/apache/catalina/realm
LocalStrings.properties
catalina/src/share/org/apache/catalina/startup
ClassLoaderFactory.java
Added: catalina/src/share/org/apache/catalina/mbeans
StandardEngineMBean.java
Log:
Add an override MBean for the StandardEngine component that simulates a
"parent" attribute. These will be added for the other components as
needed to provide a consistent way for admin applications to navigate to
the parent component of any component.
Revision Changes Path
1.86 +33 -1 jakarta-tomcat-4.0/catalina/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/build.xml,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- build.xml 2001/10/30 03:35:58 1.85
+++ build.xml 2001/11/02 20:34:47 1.86
@@ -28,6 +28,7 @@
<pathelement location="${commons-digester.jar}"/>
<pathelement location="${commons-modeler.jar}"/>
<pathelement location="${commons-pool.jar}"/>
+ <pathelement location="${jaas.jar}"/>
<pathelement location="${jcert.jar}"/>
<pathelement location="${jdbc20ext.jar}"/>
<pathelement location="${jmxri.jar}"/>
@@ -55,6 +56,7 @@
<pathelement location="${commons-digester.jar}"/>
<pathelement location="${commons-modeler.jar}"/>
<pathelement location="${commons-pool.jar}"/>
+ <pathelement location="${jaas.jar}"/>
<pathelement location="${jcert.jar}"/>
<pathelement location="${jdbc20ext.jar}"/>
<pathelement location="${jmxri.jar}"/>
@@ -103,6 +105,9 @@
<available property="modeler.present"
classname="org.apache.commons.modeler.Registry"
classpath="${commons-modeler.jar}"/>
+ <available property="jaas.present"
+ classname="javax.security.auth.Subject"
+ classpath="${jaas.jar}" />
<condition property="jaxp.present">
<and>
<available classname="javax.xml.parsers.SAXParser"
@@ -171,6 +176,7 @@
<!-- JAR files availability flags -->
<available property="tomcat-ajp.jar.present" file="${tomcat-ajp.jar}" />
<available property="dbcp.jar.present" file="${commons-dbcp.jar}" />
+ <available property="jaas.jar.present" file="${jaas.jar}" />
<condition property="javamail.jar.present">
<and>
<available file="${activation.jar}" />
@@ -205,6 +211,12 @@
</and>
</or>
</condition>
+ <condition property="compile.jaas">
+ <or>
+ <equals arg1="${full.dist}" arg2="on" />
+ <equals arg1="${jaas.present}" arg2="true" />
+ </or>
+ </condition>
<condition property="compile.javamail">
<or>
<equals arg1="${full.dist}" arg2="on" />
@@ -276,6 +288,17 @@
<equals arg1="${dbcp.present}" arg2="true" />
</or>
</condition>
+ <condition property="copy.jaas.jar">
+ <or>
+ <equals arg1="${full.dist}" arg2="on" />
+ <and>
+ <equals arg1="${jaas.jar.present}" arg2="true" />
+ <not>
+ <equals arg1="${jdk.1.4.present}" arg2="true" />
+ </not>
+ </and>
+ </or>
+ </condition>
<condition property="copy.jdbc20ext.jar">
<or>
<equals arg1="${full.dist}" arg2="on" />
@@ -415,6 +438,7 @@
<echo message="--- Optional Libraries ---" />
<echo message="dbcp.present=${dbcp.present}" />
+ <echo message="jaas.present=${jaas.present}" />
<echo message="javamail.present=${javamail.present}" />
<echo message="jmx.present=${jmx.present}" />
<echo message="jmxtools.present=${jmxtools.present}" />
@@ -435,6 +459,7 @@
<echo message="--- Optional JARs ---" />
<echo message="tomcat-ajp.jar.present=${tomcat-ajp.jar.present}" />
<echo message="dbcp.jar.present=${dbcp.jar.present}" />
+ <echo message="jaas.jar.present=${jaas.jar.present}" />
<echo message="javamail.jar.present=${javamail.jar.present}" />
<echo message="jdbc20ext.jar.present=${jdbc20ext.jar.present}" />
<echo message="jmxri.jar.present=${jmxri.jar.present}" />
@@ -449,6 +474,7 @@
<echo message="--- Conditional compilation flags ---" />
<echo message="compile.dbcp=${compile.dbcp}" />
+ <echo message="compile.jaas=${compile.jaas}" />
<echo message="compile.javamail=${compile.javamail}" />
<echo message="compile.jmx=${compile.jmx}" />
<echo message="compile.jndi=${compile.jndi}" />
@@ -462,6 +488,7 @@
<echo message="--- Distribution flags ---" />
<echo message="copy.tomcat-ajp.jar=${copy.tomcat-ajp.jar}" />
<echo message="copy.dbcp.jar=${copy.dbcp.jar}" />
+ <echo message="copy.jaas.jar=${copy.jaas.jar}" />
<echo message="copy.jdbc20ext.jar=${copy.jdbc20ext.jar}" />
<echo message="copy.javamail.jar=${copy.javamail.jar}" />
<echo message="copy.jmxri.jar=${copy.jmxri.jar}" />
@@ -505,6 +532,9 @@
<target name="copy-dbcp.jar" if="copy.dbcp.jar">
<copy todir="${catalina.build}/server/lib" file="${commons-dbcp.jar}"/>
</target>
+ <target name="copy-jaas.jar" if="copy.jaas.jar">
+ <copy todir="${catalina.build}/server/lib" file="${jaas.jar}"/>
+ </target>
<target name="copy-jdbc20ext.jar" if="copy.jdbc20ext.jar">
<copy todir="${catalina.build}/common/lib" file="${jdbc20ext.jar}"/>
</target>
@@ -551,7 +581,7 @@
<!-- =================== BUILD: Copy Static Files ======================= -->
- <target name="build-static"
depends="flags,flags.display,build-prepare,copy-activation.jar,copy-tomcat-ajp.jar,copy-dbcp.jar,copy-jdbc20ext.jar,copy-jmxri.jar,copy-jmxtools.jar,copy-jndi.jar,copy-jsse.jar,copy-jta.jar,copy-ldap.jar,copy-modeler.jar,copy-pool.jar,copy-tomcat-util.jar,copy-tyrex.jar,copy-xerces.jar">
+ <target name="build-static"
depends="flags,flags.display,build-prepare,copy-activation.jar,copy-tomcat-ajp.jar,copy-dbcp.jar,copy-jaas.jar,copy-jdbc20ext.jar,copy-jmxri.jar,copy-jmxtools.jar,copy-jndi.jar,copy-jsse.jar,copy-jta.jar,copy-ldap.jar,copy-modeler.jar,copy-pool.jar,copy-tomcat-util.jar,copy-tyrex.jar,copy-xerces.jar">
<!-- Executable Commands -->
<copy todir="${catalina.build}/bin">
@@ -618,6 +648,8 @@
unless="compile.jmx"/>
<exclude name="org/apache/catalina/net/SSLServerSocketFactory.java"
unless="compile.jsse"/>
+ <exclude name="org/apache/catalina.realm/JAAS**"
+ unless="compile.jaas"/>
<exclude name="org/apache/catalina/servlets/SsiInvokerServlet.java"
unless="compile.ssi"/>
<exclude name="org/apache/catalina/util/ssi/**"
1.5 +7 -1
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
Index: mbeans-descriptors.xml
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- mbeans-descriptors.xml 2001/10/30 17:39:49 1.4
+++ mbeans-descriptors.xml 2001/11/02 20:34:47 1.5
@@ -6,7 +6,7 @@
<!--
Descriptions of JMX MBeans for Catalina
- $Id: mbeans-descriptors.xml,v 1.4 2001/10/30 17:39:49 craigmcc Exp $
+ $Id: mbeans-descriptors.xml,v 1.5 2001/11/02 20:34:47 craigmcc Exp $
-->
<mbeans-descriptors>
@@ -568,6 +568,7 @@
<mbean name="StandardEngine"
+ className="org.apache.catalina.mbeans.StandardEngineMBean"
description="Standard Engine Component"
domain="Catalina"
group="ENGINE"
@@ -588,6 +589,11 @@
<attribute name="name"
description="Unique name of this Engine"
type="java.lang.String"/>
+
+ <attribute name="parent"
+ description="Parent (Service) that owns this Engine"
+ type="org.apache.catalina.Service"/>
+ writeable="false"/>
<attribute name="service"
description="Service that owns this Engine"
1.1
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardEngineMBean.java
Index: StandardEngineMBean.java
===================================================================
/*
* $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardEngineMBean.java,v
1.1 2001/11/02 20:34:47 craigmcc Exp $
* $Revision: 1.1 $
* $Date: 2001/11/02 20:34:47 $
*
* ====================================================================
*
* 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 [EMAIL PROTECTED]
*
* 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.catalina.mbeans;
import javax.management.MBeanException;
import javax.management.RuntimeOperationsException;
import org.apache.catalina.Engine;
import org.apache.catalina.Service;
import org.apache.commons.modeler.BaseModelMBean;
/**
* <p>A <strong>ModelMBean</strong> implementation for the
* <code>org.apache.catalina.core.StandardEngine</code> component.</p>
*
* @author Craig R. McClanahan
* @version $Revision: 1.1 $ $Date: 2001/11/02 20:34:47 $
*/
public class StandardEngineMBean extends BaseModelMBean {
// ----------------------------------------------------------- Constructors
/**
* Construct a <code>ModelMBean</code> with default
* <code>ModelMBeanInfo</code> information.
*
* @exception MBeanException if the initializer of an object
* throws an exception
* @exception RuntimeOperationsException if an IllegalArgumentException
* occurs
*/
public StandardEngineMBean()
throws MBeanException, RuntimeOperationsException {
super();
}
// ------------------------------------------------------------- Attributes
/**
* Return the parent (Service) that owns this Engine.
*/
public Service getParent() {
if (this.resource == null)
return (null);
Engine engine = (Engine) this.resource;
return (engine.getService());
}
// ------------------------------------------------------------- Operations
}
1.5 +6 -1
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/LocalStrings.properties
Index: LocalStrings.properties
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/LocalStrings.properties,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- LocalStrings.properties 2001/04/13 21:18:42 1.4
+++ LocalStrings.properties 2001/11/02 20:34:48 1.5
@@ -1,9 +1,14 @@
-# $Id: LocalStrings.properties,v 1.4 2001/04/13 21:18:42 craigmcc Exp $
+# $Id: LocalStrings.properties,v 1.5 2001/11/02 20:34:48 craigmcc Exp $
# language
# package org.apache.catalina.realm
+jaasRealm.accountExpired=Username {0} NOT authenticated due to expired account
+jaasRealm.authenticatedSuccess=Username {0} successfully authenticated
+jaasRealm.credentialExpired=Username {0} NOT authenticated due to expired credential
+jaasRealm.failedLogin=Username {0} NOT authenticated due to failed login
+jaasRealm.loginException=Login exception authenticating username {0}
jdbcRealm.authenticateFailure=Username {0} NOT successfully authenticated
jdbcRealm.authenticateSuccess=Username {0} successfully authenticated
jdbcRealm.close=Exception closing database connection
1.5 +5 -4
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ClassLoaderFactory.java
Index: ClassLoaderFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ClassLoaderFactory.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ClassLoaderFactory.java 2001/09/25 22:04:44 1.4
+++ ClassLoaderFactory.java 2001/11/02 20:34:48 1.5
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ClassLoaderFactory.java,v
1.4 2001/09/25 22:04:44 remm Exp $
- * $Revision: 1.4 $
- * $Date: 2001/09/25 22:04:44 $
+ * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ClassLoaderFactory.java,v
1.5 2001/11/02 20:34:48 craigmcc Exp $
+ * $Revision: 1.5 $
+ * $Date: 2001/11/02 20:34:48 $
*
* ====================================================================
*
@@ -92,7 +92,7 @@
* </ul>
*
* @author Craig R. McClanahan
- * @version $Revision: 1.4 $ $Date: 2001/09/25 22:04:44 $
+ * @version $Revision: 1.5 $ $Date: 2001/11/02 20:34:48 $
*/
public final class ClassLoaderFactory {
@@ -118,6 +118,7 @@
private static String[] triggers = {
"com.sun.jndi.ldap.LdapCtxFactory", // LDAP added in 1.3
"com.sun.net.ssl.internal.ssl.Provider", // JSSE added in 1.4
+ "javax.security.auth.Subject", // JAAS added in 1.4
"javax.naming.Context", // JNDI added in 1.3
"javax.net.SocketFactory", // JSSE added in 1.4
"javax.security.cert.X509Certificate", // JSSE added in 1.4
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>