tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amy Roh <amy...@apache.org>
Subject Re: cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
Date Mon, 04 Oct 2004 22:30:02 GMT
Hi Remy,

>  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.

>  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");

I don't think Realm has "managedResource" attribute.

Shouldn't we be moving towards getting rid of all non-serializable 
attributes and return types in order to support remote access to MBeanServer 
using JSR 160?

Thanks,
Amy

>  +                    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
>
> 


---------------------------------------------------------------------
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