DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26523>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26523

StandardEngine make two init() calls at sub Mbeans

           Summary: StandardEngine make two init() calls at sub Mbeans
           Product: Tomcat 5
           Version: 5.0.18
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Catalina
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I look deep at source to start a StandardEngine with a conf/tomcat5-mbeans.xml.
This feature to integrate easy some service JMX Mbeans is cool.
After some time I see that init() is call twice.

first call is at: StandardEngine L595  readEngineMbeans()

           Registry.getRegistry(null, null).registerComponent
                (mbeansMB, domain + ":type=MbeansFile", null);
            mbeansMB.load();
L595:            mbeansMB.init();
            mbeansMB.setRegistry(Registry.getRegistry(null, null));

-- please change to
           Registry.getRegistry(null, null).registerComponent
                (mbeansMB, domain + ":type=MbeansFile", null);
            mbeansMB.load();
            mbeansMB.setRegistry(Registry.getRegistry(null, null));

second call is at 424 init()

       if( mbeans != null ) {
            try {
                Registry.getRegistry(null, null).invoke(mbeans, "init", false);
            } catch (Exception e) {
                log.error("Error in init() for " + mbeansFile, e);
            }
        }

Also see my commons-modeler feature enhancement (MbeansSource):
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26493

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to