Hi,
I am using JMX to connect to a Tomcat instance and looking at attributes for
a jdbc datasource as shown below.
MBeanServerConnection conn = jmxc.getMBeanServerConnection();
ObjectName on = new
ObjectName("Catalina:type=DataSource,path=/appdb,host=localhost,class=javax.sql.DataSource,name=\"jdbc/appdb\"");
mbsc.getAttribute(on, "numIdle")
Is there an Mbean provided by Tomcat that can provide me the following
information
- Whether Tomcat is running
- Whether a specific web app running under a specific context is runnin
- The health of the environment in general (tomcat, OS etc)
- Whether a JNDI datasource is available and if possible how many active
database connections there are and how many free.
I have been google'ing around but the majority of the examples talk about
writing your own Mbean and including it as part of the application. I am
trying to write an external client utility that will monitor the application
away from Tomcat.
Thanks