commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: jsvc thread monitoring
Date Tue, 05 Oct 2010 18:02:01 GMT
On 10/05/2010 07:20 PM, Benjamin Watine wrote:
> Hi
>
> I use jsvc to start a deamon on an unix plateform. The service starts and stops as expected,
but if my thread crashes, the Deamon don't stops and even restart an other thread.
> I would like to monitor my thread, and if it crashes, the Deamon stops, exits, and delete
PID file. How can I do this ?

What do you mean by 'my thread crashes' ?
There is a shutdown method that if called with reload==true
will cause the jsvc to reload the jvm completely.

> I need this to allow me to monitor that my service is running well.
>

If your jvm crashes (cores), jsvc will return 1.
You can create a shell script that will call jsvc again
in that case.


Regards
-- 
^TM

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


Mime
View raw message