tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardEngine.java
Date Sat, 19 Apr 2003 21:14:16 GMT
costin      2003/04/19 14:14:16

  Modified:    catalina/src/share/org/apache/catalina/core
                        StandardEngine.java
  Log:
  A small improvement in loading conf/tomcat5-mbeans.xml ( which contains
  mbeans ). The loader will be registered in the console so we can access the
  save method from the console.
  
  Revision  Changes    Path
  1.13      +12 -7     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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- StandardEngine.java	18 Apr 2003 09:48:27 -0000	1.12
  +++ StandardEngine.java	19 Apr 2003 21:14:16 -0000	1.13
  @@ -1,8 +1,4 @@
   /*
  - * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -81,6 +77,7 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.apache.commons.modeler.Registry;
  +import org.apache.commons.modeler.modules.MbeansSource;
   import java.io.File;
   import java.util.List;
   
  @@ -592,8 +589,16 @@
       
       private void readEngineMbeans() {
           try {
  -            mbeans=Registry.getRegistry().loadMBeans(new File(mbeansFile));
  -            Registry.getRegistry().invoke(mbeans, "init", false);
  +            MbeansSource mbeansMB=new MbeansSource();
  +            File mbeansF=new File( mbeansFile );
  +            mbeansMB.setSource(mbeansF);
  +            
  +            Registry.getRegistry().registerComponent(mbeansMB, 
  +                    domain + ":type=MbeansFile", null);
  +            mbeansMB.load();
  +            mbeansMB.init();
  +            mbeansMB.setRegistry(Registry.getRegistry());
  +            mbeans=mbeansMB.getMBeans();
               
           } catch( Throwable t ) {
               log.error( "Error loading " + mbeansFile, t );
  
  
  

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