You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Stefan Fleiter <sf...@web.de> on 2004/09/17 17:41:46 UTC

Monitoring different Contexts with JMX MBean

Hi,

I try to do my first steps with the java server platform and have chosen 
Tomcat for this.

I wrote a class which is able to Monitor the database pools of a Context
when beeing called out of it.
I only had to use JNDI to iterate over "comp/env/jdbc" and cast the 
DataSource instances to a BasicDataSource.

Now I want to implement an MBean which is able to monitor the pools of 
all Contexts of Tomcat.

I even don't know whether this is possible, but hope to get some help.

Now my concrete questions:

  - Can I somehow change the Context my code is executed in?
  - If not: How do I get instances of all JNDI DataSource for all
    Contexts ?

  - Where do I have to put my MBean .class-files?
    In the webapps dir or somewhere else?

  - How can I make Tomcat register my MBeans at startup?

Thanks a lot in advance,
Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org