[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspectj-users] aspectJ and System.exit().
- From: Holger HoffstÃtte <holger@xxxxxxxxxx>
- Date: Tue, 18 Dec 2007 14:21:52 +0100
- Delivered-to: email@example.com
- User-agent: Thunderbird 22.214.171.124 (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:
> 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" :-)