I've done this just recently in fact! I was looking for a means of
monitoring objects within our Tomcat and dicovered JMX. To get to Tomcats
Mbean Server you use the following (I've got it in a GeneralJMX class in a
static method for easy of reuse):
public class GeneralJMX {
/** Creates a new instance of GeneralJMX */
public GeneralJMX() {
}
/***************************************************************************
*
* Get the MBean server associated with Tomcat.
*
* @return the MBean server, or null if one canot be found.
*/
public static MBeanServer getTomcatMBeanServer() {
MBeanServer server = null;
List myList = MBeanServerFactory.findMBeanServer(null);
if (myList.toArray().length > 0)
server = (MBeanServer)myList.toArray()[0];
return server;
}
}
-----Original Message-----
From: s p [mailto:[EMAIL PROTECTED]
Sent: 27 August 2003 03:59
To: [EMAIL PROTECTED]
Subject: How to get reference of MBeanServer in Tomcat
I am using JMX technology to get information of Tomcat
server. I am unable to get the reference of the
MBeanServer in Tomcat. Has any one worked on this
before. I am able get the information for other
application servers like weblogic and webshere. But I
did not find suitable APIs for Tomcat. Any help in
this direction will be appreciated.
Regards,
Santosh
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This e-mail is confidential and privileged. If you are not the intended
recipient please accept our apologies; please do not disclose, copy or
distribute information in this e-mail or take any action in reliance on its
contents: to do so is strictly prohibited and may be unlawful. Please
inform us that this message has gone astray before deleting it. Thank you
for your co-operation.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]