tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ziggy <zigg...@gmail.com>
Subject Re: Accessing context information remotely - Context.getAvailable() etc.
Date Thu, 06 Jan 2011 19:33:07 GMT
Thanks for the response.
I am writing an external java application that reads this values
periodically. This will be launched from a unix cron job. Its just a simple
tools that periodically checks that the application is available.

I have gone through all the mbeans by using Jconsole but i cant find the one
i need that tells me that the application is active and running.

I do use Jconsole and jVisualvm and also LamdaProbe but all these require
someone to physically log on to look at anything. The tool i am writing will
do this automatically and generate an alert if necessary. I just need to
know which Mbean to look at. I have found the Datasource ones but not the
ones related to the webapplication itsself.

Thanks

On Thu, Jan 6, 2011 at 7:28 PM, Mark Eggers <its_toasted@yahoo.com> wrote:

> ----- 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message