From: Sal I. <sal...@vo...> - 2004-03-25 19:22:34
|
Messageas far as i know System.exit () is terminal: no callbacks, no override, and it does not even come back. so use reflection instead and you won't have the compile-time dependency: final String wrapperManagerClassName = "org.tanukisoftware.wrapper.WrapperManager"; final Class wrapperManagerClass = ClassUtil.forName (wrapperManagerClassName); final Method restartMethod = wrapperManagerClass.getDeclaredMethod ( "restart", new Class [] {}); restartMethod.invoke (null, new Object[] {}); -----Original Message----- From: wra...@li... [mailto:wra...@li...]On Behalf Of Jan Blok Sent: Thursday, March 25, 2004 10:56 AM To: wra...@li... Subject: [Wrapper-user] restarting the JVM with special exit code? Hi, I see in the docs it is possible to request a restart with WrapperManager.restart(), but I cannot have a compile decency on the wrapper code. So I wonder if it's possible to configure the wrapper so it catches a System.exit(X) where X == Y todo a restart? In my case I want a restart when I quit with System.exit(99) It would be awesome when I could specify: # Makes the wrapper restart when System.exit(99) is executed wrapper.restart.on_exitcode=99 Kind Regards Jan Blok |