[EMAIL PROTECTED] wrote:
> yes, u can do that, but the underlying native I/O already uses SIGNALS to catch
>SIGIO,
> SIGALRM which is used to impliment the green_threads/context switching of java (fake)
> threads. So be carefull what sigs u catch, or turn off.
>
>
How would I do that though ?
What I would like is just a very simple SignalCatcher for SIGTERM, SIGQUIT, SIGHUP
and SIGINT: just four signals. I want to catach them in Java, and write the capture
to a systems log. So that at least overnight personnel would know how my java batcher
died .
Would I just write a JNI method to register these 4 signals ?
And then perhaps another one to catch the signals ?
> [EMAIL PROTECTED] wrote:
>
> > Can Java catch signals ?
> >
> > Could the Java Native Interface be used to help Java catch signals ?
> >
> > * prelim design in my head *
> > I have a huge script that run configurable batch jobs sequently over several hours.
> > I would like to rewrite the damn thing in Java, so that I could write module
> > to display dynamic status on the web via a browser. The only problem is that
> > java does not handle system interrupts or external stimuli well enough.
>
Cheers
Peter
--
import java.std.disclaimer.*; // "Dontcha just love the API, baby bop!"
Peter Pilgrim Dept:OTC Derivatives IT,
Deutsche Bank (UK) Ltd, Groundfloor 133 Houndsditch, London, EC3A 7DX
Tel: +44-545-8000 Direct: +44 (0)171-545-9977 Fax: 0171-545-4313
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-