tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
Date Sun, 03 Oct 2004 08:53:56 GMT
remm        2004/10/03 01:53:56

  Modified:    .        build.xml
               catalina/src/share/org/apache/catalina/core
                        StandardContext.java StandardEngine.java
                        mbeans-descriptors.xml
               catalina/src/share/org/apache/catalina/connector
                        Connector.java
               resources/mbeans tomcat5-ant.xml
               catalina/src/share/org/apache/catalina/realm RealmBase.java
               webapps/docs changelog.xml
  Log:
  - Fix embed and deployer packaging.
  - Fix JMX registration of realm.
  - Fix a variety of problems in MBean names.
  
  Revision  Changes    Path
  1.215     +25 -52    jakarta-tomcat-5/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-5/build.xml,v
  retrieving revision 1.214
  retrieving revision 1.215
  diff -u -r1.214 -r1.215
  --- build.xml	16 Sep 2004 13:38:14 -0000	1.214
  +++ build.xml	3 Oct 2004 08:53:55 -0000	1.215
  @@ -830,54 +830,42 @@
     <!-- ====================== Embed target =================== -->
   
     <target name="embed" description="Create a set of jars for embedded tomcat" > 
  -    <!-- Generic libraries ( share ?) -->
  +
  +  	<!-- Generic libraries -->
       <copy todir="embed/lib" file="${commons-logging.jar}"/>
  -    <copy todir="embed/lib" file="${commons-digester.jar}"/>
       <copy todir="embed/lib" file="${commons-modeler.jar}"/>
  -    <copy todir="embed/lib" file="${commons-beanutils.jar}"/>
  -    <copy todir="embed/lib" file="${commons-collections.jar}"/>
  -
  -    <copy todir="embed/lib" file="${jasper-compiler-jdt.jar}"/>
   
  -    <copy todir="embed/lib">
  -      <fileset dir="build/server/lib">
  -        <include name="tomcat-util.jar"/>
  -      </fileset>
  -    </copy>
  -    
       <!-- Connector -->
       <copy todir="embed/lib">
         <fileset dir="build/server/lib">
  +      	<!--<include name="tomcat-ajp.jar"/>-->
           <include name="tomcat-coyote.jar"/>
  -        <include name="tomcat-http11.jar"/>
  -        <include name="tomcat-ajp.jar"/>
  +        <include name="tomcat-http.jar"/>
  +        <include name="tomcat-util.jar"/>
         </fileset>
       </copy>
   
       <!-- Servlet API implementation -->
       <copy todir="embed/lib">
         <fileset dir="build/common/lib">
  +        <include name="naming-factory.jar"/>
           <include name="servlet-api.jar"/>
  -        <include name="jsp-api.jar"/>
  -        <include name="naming-resources.jar"/>
  -        <include name="naming-common.jar"/>
         </fileset>
         <fileset dir="build/server/lib">
  -        <include name="servlets-common.jar"/>
  -        <include name="servlets-invoker.jar"/>
  -        <include name="servlets-default.jar"/>
           <include name="catalina.jar"/>
           <include name="catalina-optional.jar"/>
  +        <include name="naming-resources.jar"/>
  +        <include name="servlets-default.jar"/>
         </fileset>
       </copy>
   
  -    <!-- JNDI extra -->
  +    <!-- JNDI extra 
       <copy todir="embed/lib">
         <fileset dir="build/common/lib">
  -        <include name="naming-java.jar"/>
           <include name="naming-factory.jar"/>
         </fileset>
       </copy>
  +    -->
   
       <!-- JSP runtime -->
       <copy todir="embed/lib">
  @@ -885,24 +873,19 @@
           <include name="commons-el.jar"/>
           <include name="jsp-api.jar"/>
           <include name="jasper-runtime.jar"/>
  -        <include name="jasper-compiler.jar"/>
         </fileset>
       </copy>
   
       <!-- JSP compiler - not needed for an minimal server if it 
            uses precompilation -->
  -    <!--
       <copy todir="embed/lib">
         <fileset dir="build/common/lib">
  -        <include name="ant.jar"/>
  -        <include name="ant-launcher.jar" />
  -      </fileset>
  -      <fileset dir="build/common/lib">
           <include name="jasper-compiler.jar"/>
  +        <include name="jasper-compiler-jdt.jar"/>
         </fileset>
       </copy>
  -    -->
  -    <copy tofile="embed/build.xml" file="resources/mbeans/tomcat5-ant.xml" />
  +
  +  	<copy tofile="embed/build.xml" file="resources/mbeans/tomcat5-ant.xml" />
       <!-- 
       <copy tofile="embed/tomcat5-mbeans.xml" file="resources/mbeans/tomcat5-mbeans.xml"
/>
       <copy tofile="embed/tomcat5-mlet.xml" file="resources/mbeans/tomcat5-mlet.xml" />
  @@ -910,9 +893,10 @@
       -->
   
       <mkdir dir="embed/conf"/>
  -    <copy todir="embed/conf">
  +  	<delete file="embed/conf/context.xml" />
  +  	<copy todir="embed/conf">
         <fileset dir="build/conf">
  -         <include name="jk2.properties"/>
  +         <include name="context.xml"/>
            <include name="tomcat-users.xml"/>
            <include name="web.xml"/>
            <!-- no longer needed 
  @@ -920,7 +904,8 @@
            -->
         </fileset>
       </copy>
  -
  +  	<replace file="embed/conf/context.xml" token="&lt;Context" value="&lt;Context
privileged='true'" />
  +  	
       <mkdir dir="embed/webapps"/>
       <copy todir="embed/webapps" >
          <fileset dir="dist/webapps" includes="ROOT/**"/>
  @@ -935,7 +920,7 @@
   
     <target name="deployer" description="Create the Tomcat deployer binary" > 
   
  -    <!-- JSP and Servlet runtime -->
  +    <!-- Servlet and JSP -->
       <copy todir="${tomcat.deployer}/lib">
         <fileset dir="${tomcat.build}/common/lib">
           <include name="commons-el.jar"/>
  @@ -947,35 +932,22 @@
       </copy>
   
       <!-- Digester and dependencies -->
  -    <copy todir="${tomcat.deployer}/lib">
  -      <fileset dir="${tomcat.build}/server/lib">
  -        <include name="commons-digester.jar"/>
  -        <include name="commons-beanutils.jar"/>
  -      </fileset>
  -    </copy>
  -    <copy todir="${tomcat.deployer}/lib">
  -      <fileset dir="${tomcat.build}/common/lib">
  -        <include name="commons-collections.jar"/>
  -      </fileset>
  -    </copy>
  -
       <copy todir="${tomcat.deployer}/lib" 
              file="${tomcat.build}/server/lib/catalina-ant.jar"/>
       <copy todir="${tomcat.deployer}/lib" file="${commons-logging.jar}"/>
  -
       <jar jarfile="${tomcat.deployer}/lib/catalina-deployer.jar">
          <fileset dir="${tomcat.build}/classes">
             <include name="org/apache/catalina/startup/DigesterFactory.class" />
             <include name="org/apache/catalina/util/SchemaResolver.class" />
             <include name="org/apache/catalina/util/StringManager.class" />
  +          <include name="org/apache/tomcat/util/*" />
  +          <include name="org/apache/tomcat/util/digester/*" />
  +          <exclude name="**/package.html" />
  +          <exclude name="**/LocalStrings_*" />
          </fileset>
       </jar>
   
  -  	<!--
  -    <copy todir="${tomcat.deployer}/lib" file="${xercesImpl.jar}"/>
  -    <copy todir="${tomcat.deployer}/lib" file="${xml-apis.jar}"/>
  -    -->
  -
  +    <!-- Main build script -->
       <copy todir="${tomcat.deployer}">
         <fileset dir="${basedir}/resources/deployer" />
       </copy>
  @@ -1382,6 +1354,7 @@
       <copy todir="${tomcat.dist}/webapps">
         <fileset dir="${tomcat.build}/webapps">
           <exclude name="**/balancer/WEB-INF/classes/**" />
  +        <exclude name="**/ROOT/WEB-INF/classes/**" />
           <exclude name="**/WEB-INF/src/**" />
         </fileset>
       </copy>
  
  
  
  1.152     +2 -2      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.151
  retrieving revision 1.152
  diff -u -r1.151 -r1.152
  --- StandardContext.java	2 Oct 2004 09:22:59 -0000	1.151
  +++ StandardContext.java	3 Oct 2004 08:53:55 -0000	1.152
  @@ -3904,7 +3904,7 @@
           if( realm == null ) {
               ObjectName realmName=null;
               try {
  -                realmName=new ObjectName( getEngineName() + ":type=Host,host=" + 
  +                realmName=new ObjectName( getEngineName() + ":type=Realm,host=" + 
                           getHostname() + ",path=" + getPath());
                   if( mserver.isRegistered(realmName ) ) {
                       mserver.invoke(realmName, "init", 
  
  
  
  1.26      +18 -1     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java
  
  Index: StandardEngine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- StandardEngine.java	16 Aug 2004 09:31:05 -0000	1.25
  +++ StandardEngine.java	3 Oct 2004 08:53:56 -0000	1.26
  @@ -404,6 +404,23 @@
           if( !initialized ) {
               init();
           }
  +
  +        // Look for a realm - that may have been configured earlier. 
  +        // If the realm is added after context - it'll set itself.
  +        if( realm == null ) {
  +            ObjectName realmName=null;
  +            try {
  +                realmName=new ObjectName( domain + ":type=Realm");
  +                if( mserver.isRegistered(realmName ) ) {
  +                    Realm nrealm = (Realm)mserver.getAttribute(realmName,
  +                                                       "managedResource");
  +                    setRealm(nrealm);
  +                }
  +            } catch( Throwable t ) {
  +                log.debug("No realm for this engine " + realmName);
  +            }
  +        }
  +            
           // Log our server identification information
           //System.out.println(ServerInfo.getServerInfo());
           log.info( "Starting Servlet Engine: " + ServerInfo.getServerInfo());
  
  
  
  1.36      +1 -1      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- mbeans-descriptors.xml	29 Sep 2004 21:09:40 -0000	1.35
  +++ mbeans-descriptors.xml	3 Oct 2004 08:53:56 -0000	1.36
  @@ -547,7 +547,7 @@
                  returnType="void">
         <parameter name="connector"
                    description="Connector object"
  -                 type="org.apache.catalina.Connector"/>
  +                 type="org.apache.catalina.connector.Connector"/>
       </operation>
       
       <operation name="start" description="Start" impact="ACTION" returnType="void" />
  
  
  
  1.6       +2 -2      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Connector.java
  
  Index: Connector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Connector.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Connector.java	29 Sep 2004 09:55:38 -0000	1.5
  +++ Connector.java	3 Oct 2004 08:53:56 -0000	1.6
  @@ -1156,7 +1156,7 @@
               log.debug("Adding to " + parentName );
               if( mserver.isRegistered(parentName )) {
                   mserver.invoke(parentName, "addConnector", new Object[] { this },
  -                        new String[] {"org.apache.catalina.Connector"});
  +                        new String[] {"org.apache.catalina.connector.Connector"});
                   // As a side effect we'll get the container field set
                   // Also initialize will be called
                   //return;
  
  
  
  1.17      +16 -35    jakarta-tomcat-5/resources/mbeans/tomcat5-ant.xml
  
  Index: tomcat5-ant.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-5/resources/mbeans/tomcat5-ant.xml,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- tomcat5-ant.xml	13 Nov 2003 08:45:48 -0000	1.16
  +++ tomcat5-ant.xml	3 Oct 2004 08:53:56 -0000	1.17
  @@ -145,8 +145,12 @@
     <target name="run" depends="init,jmx-console"
           description="Start tomcat as an mbean, no server.xml">
   
  +    <property name="catalina.useNaming" value="false" />
  +
  +<!--
       <modelerRegistry resource="org/apache/catalina/mbeans/mbeans-descriptors.xml" />
       <modelerRegistry resource="org/apache/catalina/loader/mbeans-descriptors.xml" />
  +-->
       <mkdir dir="${tomcat.home}/work/${domain}/" />
   
       <jmx-service>
  @@ -166,7 +170,6 @@
            <attribute name="name" value="Tomcat-Standalone"/>
          </mbean>
   
  -
          <mbean name="${domain}:type=Engine" 
                 code="org.apache.catalina.core.StandardEngine"
                 modeler="true">
  @@ -180,60 +183,38 @@
                 code="org.apache.catalina.realm.JAASRealm" modeler="true">
          </mbean>
   -->
  +
          <mbean name="${domain}:type=Realm" 
                 code="org.apache.catalina.realm.MemoryRealm" modeler="true">
            <attribute name="pathname"
                       value="${tomcat.home}/conf/tomcat-users.xml" />
          </mbean>
   
  -<!--
  -       <mbean name="${domain}:type=Connector,port=9009" 
  -              code="org.apache.coyote.tomcat5.CoyoteConnector"
  -              modeler="true">
  -         <attribute name="protocolHandlerClassName"
  -                    value="org.apache.jk.server.JkCoyoteHandler" />
  -       </mbean>
  --->
  -
  -       <mbean name="${domain}:type=Channel,name=ChannelUn" 
  -              code="org.apache.jk.common.ChannelUn"
  -              modeler="true">
  -          <attribute name="file" value="${tomcat.home}/work/${domain}/jk2.channel" />
  -       </mbean>
  -
  -
          <mbean name="${domain}:type=Connector,port=9080" 
  -              code="org.apache.coyote.tomcat5.CoyoteConnector"
  +              code="org.apache.catalina.connector.Connector"
                 modeler="true">
             <attribute name="port" value="9080" />
          </mbean>
   
   
  -<!--
  -       <mbean name="${domain}:type=DefaultContext,host=localhost,service=Tomcat-Standalone"

  -              code="org.apache.catalina.core.StandardDefaultContext"
  -              modeler="true">
  -       </mbean>
  --->
  -
  +<!-- Optional: when the context is created it'll create a host if none is found. -->
  +<!-- Setting appBase will make use of auto deployment. Regular deployment can be used
using
  +     static declarations of MBeans for each of the individual contexts -->
   
  -<!-- Optional: when the context is created it'll create a host if none is found.
  --->
          <mbean name="${domain}:type=Host,host=localhost" 
                 code="org.apache.catalina.core.StandardHost" modeler="true">
            <attribute name="name" value="localhost"/>
  +         <attribute name="appBase" value="webapps"/>
          </mbean>
   
  -
  +       <!-- 
          <mbean name="${jsr77Domain}:j2eeType=WebModule,name=//localhost/,J2EEApplication=none,J2EEServer=none"

                 code="org.apache.catalina.core.StandardContext"  modeler="true">
            <attribute name="docBase" value="${tomcat.webapps}/ROOT" />
  -         <!-- Required for now -->
            <attribute name="privileged" value="true" />
            <attribute name="engineName" value="${domain}" />
          </mbean>
   
  -<!-- 
          <mbean name="${jsr77Domain}:j2eeType=WebModule,name=//localhost/servlets-examples,J2EEApplication=none,J2EEServer=none"

                 code="org.apache.catalina.core.StandardContext"  modeler="true">
            <attribute name="docBase" value="${tomcat.webapps}/servlets-examples" />
  @@ -254,7 +235,6 @@
            <attribute name="privileged" value="true" />
            <attribute name="engineName" value="${domain}" />
          </mbean>
  --->
   
          <mbean name="${jsr77Domain}:j2eeType=WebModule,name=//localhost/manager,J2EEApplication=none,J2EEServer=none"

                 code="org.apache.catalina.core.StandardContext"  modeler="true">
  @@ -262,22 +242,23 @@
            <attribute name="engineName" value="${domain}" />
            <attribute name="privileged" value="true" />
          </mbean>
  +       -->
   
  -       <!-- The realm must be declared after the web module (for now). -->
  +       <!-- The realm must be declared after the web module (for now).
          <mbean name="${domain}:type=Realm,host=localhost,path=manager" 
                 code="org.apache.catalina.realm.MemoryRealm" modeler="true">
            <attribute name="pathname"
                       value="${tomcat.home}/conf/tomcat-users.xml" />
          </mbean>
  +       -->
   
  -
  -<!--
  +       <!--
          <mbean name="${domain}:j2eeType=WebModule,name=//localhost/admin,J2EEApplication=none,J2EEServer=none"

                 code="org.apache.catalina.core.StandardContext"  modeler="true">
            <attribute name="docBase" value="${tomcat.webapps}/admin" />
            <attribute name="privileged" value="true" />
          </mbean>
  --->
  +       -->
   
       </jmx-service>
     </target>
  
  
  
  1.38      +3 -3      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/RealmBase.java
  
  Index: RealmBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/RealmBase.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- RealmBase.java	30 Aug 2004 20:31:42 -0000	1.37
  +++ RealmBase.java	3 Oct 2004 08:53:56 -0000	1.38
  @@ -27,6 +27,7 @@
   import java.security.cert.X509Certificate;
   import java.util.ArrayList;
   
  +import javax.management.Attribute;
   import javax.management.MBeanRegistration;
   import javax.management.MBeanServer;
   import javax.management.ObjectName;
  @@ -1173,8 +1174,7 @@
                   }
                   if( mserver.isRegistered(parent ))  {
                       log.debug("Register with " + parent);
  -                    mserver.invoke(parent, "setRealm", new Object[] {this},
  -                            new String[] {"org.apache.catalina.Realm"});
  +                    mserver.setAttribute(parent, new Attribute("realm", this));
                   }
               } catch (Exception e) {
                   log.info("Parent not available yet: " + parent);  
  
  
  
  1.126     +9 -0      jakarta-tomcat-catalina/webapps/docs/changelog.xml
  
  Index: changelog.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v
  retrieving revision 1.125
  retrieving revision 1.126
  diff -u -r1.125 -r1.126
  --- changelog.xml	1 Oct 2004 23:52:32 -0000	1.125
  +++ changelog.xml	3 Oct 2004 08:53:56 -0000	1.126
  @@ -36,6 +36,12 @@
         <update>
           Repackage naming features. (remm)
         </update>
  +      <fix>
  +        Fix deployer packaging. (remm)
  +      </fix>
  +      <fix>
  +        Fix embed packaging. (remm)
  +      </fix>
       </changelog>
     </subsection>
   
  @@ -107,6 +113,9 @@
         <update>
           Remove package triggers from the classloader, which seem useless when using Java
5. (remm)
         </update>
  +      <fix>
  +        Realms will now use set attribute to set themselves in their container when using
JMX. (remm)
  +      </fix>
       </changelog>
     </subsection>
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message