tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amy...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans MBeanUtils.java
Date Fri, 22 Nov 2002 22:36:52 GMT
amyroh      2002/11/22 14:36:52

  Modified:    catalina/src/share/org/apache/catalina/mbeans
                        MBeanUtils.java
  Log:
  Port Bill's change.
  
  Revision  Changes    Path
  1.9       +14 -7     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java
  
  Index: MBeanUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- MBeanUtils.java	14 Nov 2002 14:24:05 -0000	1.8
  +++ MBeanUtils.java	22 Nov 2002 22:36:51 -0000	1.9
  @@ -108,7 +108,6 @@
   import org.apache.catalina.deploy.ContextResourceLink;
   import org.apache.catalina.deploy.NamingResources;
   import org.apache.catalina.deploy.ResourceParams;
  -import org.apache.catalina.valves.ValveBase;
   import org.apache.commons.beanutils.PropertyUtils;
   import org.apache.commons.modeler.ManagedBean;
   import org.apache.commons.modeler.Registry;
  @@ -1527,8 +1526,16 @@
           throws MalformedObjectNameException {
   
           ObjectName name = null;
  -        Container container = ((ValveBase)valve).getContainer();
  -
  +        Container container = null;
  +        if( valve instanceof Contained ) {
  +            container = ((Contained)valve).getContainer();
  +        }
  +        if( container == null ) {
  +            throw new MalformedObjectNameException(
  +                               "Cannot create mbean for non-contained valve " +
  +                               valve);
  +        }
  +        
           if (container instanceof Engine) {
               Service service = ((Engine)container).getService();
               name = new ObjectName(domain + ":type=Valve,sequence=" +
  
  
  

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


Mime
View raw message