|
From: Leif M. <le...@ta...> - 2004-03-27 17:15:25
|
Jan, I liked this idea enough to go ahead and implement it this morning. Unfortunately it turned out to be a much more difficult task than I had originally anticipated. The state engine of the Wrapper had been starting the shutdown of the Wrapper as soon as the JVM requested a stop. This meant that it was not possible to recover and simply restart the JVM. Anyway, long story short. I ended up doing a major rework of the Wrapper's state engine. It is now much cleaner so all in all a good thing to have done. The code is all checked in to CVS if you would like to give it a try before the next release. I spent most of the day implementing and then getting all of the possible failure modes tested. I am pretty sure that I have all the bugs worked out. But due to the scale of the changes and where they were in the code, I would appreciate any prerelease testing. You are now able to configure the Wrapper to restart a JVM on any exit code. The following will restart the JVM if exit codes 1 or 2 are returned. wrapper.on_exit.1=RESTART wrapper.on_exit.2=RESTART The following will restart the JVM for any code other than 0. wrapper.on_exit.default=RESTART wrapper.on_exit.0=SHUTDOWN Cheers, Leif Jan Blok wrote: > 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 > Servoy |