[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [aspectj-users] aspectJ and System.exit().
|
- From: Holger HoffstÃtte <holger@xxxxxxxxxx>
- Date: Tue, 18 Dec 2007 14:21:52 +0100
- Delivered-to: aspectj-users@eclipse.org
- User-agent: Thunderbird 2.0.0.9 (Windows/20071031)
Jean-Louis PASTUREL wrote:
> Aspect regarding, is there a means to know when a JVM is exiting on
> System signal (like Control-C or kill -9 )?
There are the regular shutdown hooks, which are sadly much less useful
than they first appear to be:
http://java.sun.com/j2se/1.4.2/docs/guide/lang/hook-design.html
> If yes is-it possible to apply an advice âbeforeâ ?
You can always advise your own code to run before System.exit at either
call or execution. "around" might even work as well because of the way
"finally" works, though I would not bet on "after" :-)
Holger