commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Watine <wat...@cines.fr>
Subject Re: jsvc thread monitoring
Date Wed, 06 Oct 2010 07:46:55 GMT
Hi,

Thank you for your answer.
When I say "my thread crashes", I mean my thread stops in an unexpected 
way, for example on an out of memory error, a NPE, or whatever.
I would like to check whether my thread is running, and I'm not sure to 
want to relaunch it after such an error.

Ben

Le 05/10/2010 20:02, Mladen Turk a écrit :
> 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

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


Mime
View raw message