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:28:36 GMT
----- Original Message (edited) ----
From: Ziggy <ziggy25@gmail.com>
To: Tomcat Users List <users@tomcat.apache.org>
Sent: Thu, January 6, 2011 10:48:32 AM
Subject: Re: Accessing context information remotely - Context.getAvailable() 
etc.

Hi,

Thanks for your response. I am aware of the activeSessions attribute under
"Catalina:type=Manager,path=/testapp,host=localhost". I am actually doing
this programmatically and would like to know of an Mbean that would tell me
if the application is available. The activeSessions attribute can sometimes
report 0 even when the application is available so it is not reliable.

Thanks

On Thu, Jan 6, 2011 at 6:29 PM, Pid <pid@pidster.com> wrote:

> On 1/6/11 6:07 PM, Ziggy wrote:
> > 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
> >

> Connect to a Tomcat instance using JConsole and look for the 'Manager'
> objects.
>
>  Catalina:type=Manager,path=/app01,host=localhost
>
> There's an attribute 'activeSessions'.
>
>
> p
----- Original Message (edited) ----

Check the attribute stateName. It's STOPPED for an application stopped by the 
manager program, and STARTED for an application started by the manager program.

VisualVM, JConsole, and MC4J don't require separate Tomcat instrumentation.

. . . 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