tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Eggers <its_toas...@yahoo.com>
Subject Re: Accessing context information remotely - Context.getAvailable() etc.
Date Thu, 06 Jan 2011 19:19:59 GMT
----- Original Message (edited) ----
From: Ziggy <ziggy25@gmail.com>
To: Tomcat Users List <users@tomcat.apache.org>
Sent: Thu, January 6, 2011 10:07:51 AM
Subject: Accessing context information remotely - Context.getAvailable() etc.

I was looking at the code for the Tomcat Manager application to try and find
out how it is determining whether a webapp/context is running and how many
sesions are active. Looking at the code i think it uses these two methods

I was looking at the above for the above information as i am working on a
client tool that tries to find out this exact information. The tool i am
using connects to Tomcat via JMX but i am not sure if i can get the same
information via JMX. Can i access the Context class? or is there any other
way (Mbeans?) i can check if a context is running via JMX?

----- Original Message  (edited) ----

All of this information seems to be available via JMX. As others have pointed 
out, VisualVM (with the MBeans plugin) and JConsole both give you access to this 
information.

I use MC4J 1.2 beta 9 to watch and graph MBean values. It's old (and could use 
an update), but you can easily do things like graph the current number of 
sessions per web application.

Using JConsole to browse MBeans on a running Tomcat, I find MBeans that expose 
the Manager interface (including attributes such as activeSessions and 
stateName). 

There are also MBeans that expose DataSource to monitoring (including attributes 
such as numActive).

One way to explore what is available via JMX is to write a sample web 
application, launch it, and then connect to the Tomcat server with one of many 
available JMX tools.

. . . just my two cents.

/mde/


      

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


Mime
View raw message