tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Rossbach ...@objektpark.de>
Subject Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardHost.java
Date Tue, 03 Aug 2004 06:24:16 GMT
Hello Bill,

I see the change, but I missing the attribute managedResource at the 
Realms.mbeans-descriptors.xml.

Thanx
Peter

billbarker@apache.org schrieb:

>billbarker    2004/08/02 20:01:03
>
>  Modified:    catalina/src/share/org/apache/catalina/core
>                        StandardHost.java
>  Log:
>  Small changes for JMX deployment
>  
>  -- Create a Deployer for this Host.
>  -- Fix the "discover orphaned Realm" logic.  This still requires that the Realm MBean
exposes the "managedResource" attribute, but it was so broken before that nobody could have
been using it.
>  
>  Revision  Changes    Path
>  1.33      +10 -7     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java
>  
>  Index: StandardHost.java
>  ===================================================================
>  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
>  retrieving revision 1.32
>  retrieving revision 1.33
>  diff -u -r1.32 -r1.33
>  --- StandardHost.java	28 Jul 2004 18:02:15 -0000	1.32
>  +++ StandardHost.java	3 Aug 2004 03:01:03 -0000	1.33
>  @@ -29,9 +29,11 @@
>   import org.apache.catalina.Context;
>   import org.apache.catalina.DefaultContext;
>   import org.apache.catalina.Host;
>  +import org.apache.catalina.Realm;
>   import org.apache.catalina.LifecycleException;
>   import org.apache.catalina.Valve;
>   import org.apache.catalina.valves.ValveBase;
>  +import org.apache.catalina.startup.HostConfig;
>   import org.apache.commons.modeler.Registry;
>   
>   
>  @@ -736,12 +738,11 @@
>           if( realm == null ) {
>               ObjectName realmName=null;
>               try {
>  -                realmName=new ObjectName( domain + ":type=Host,host=" + getName());
>  +                realmName=new ObjectName( domain + ":type=Realm,host=" + getName());
>                   if( mserver.isRegistered(realmName ) ) {
>  -                    mserver.invoke(realmName, "setContext", 
>  -                            new Object[] {this},
>  -                            new String[] { "org.apache.catalina.Container" }
>  -                    );            
>  +                    Realm nrealm = (Realm)mserver.getAttribute(realmName,
>  +                                                       "managedResource");
>  +                    setRealm(nrealm);
>                   }
>               } catch( Throwable t ) {
>                   log.debug("No realm for this host " + realmName);
>  @@ -830,7 +831,9 @@
>                   // Register with the Engine
>                   ObjectName serviceName=new ObjectName(domain + 
>                                           ":type=Engine");
>  -                
>  +
>  +                HostConfig deployer = new HostConfig();
>  +                addLifecycleListener(deployer);                
>                   if( mserver.isRegistered( serviceName )) {
>                       log.debug("Registering with the Engine");
>                       mserver.invoke( serviceName, "addChild",
>  
>  
>  
>
>---------------------------------------------------------------------
>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