|
From: Leif M. <le...@ta...> - 2004-07-13 16:11:44
|
Daniel Schaedler wrote: > Is there a possibility to get a notification (besides the log) or to > start an other application if the Service-wrapper restarts the JVM > because of a crash? (my only idea was to scan the log for restarts) What kind of notification are you interested in? There is an outstanding feature request to make it possible to execute arbitrary commands in response to various Wrapper events. It is on my active to do list, but will not make it into the next release. https://sourceforge.net/tracker/index.php?func=detail&aid=837037&group_id=39428&atid=425190 You may want to add some comments to the Feature Request and monitor its status. > Another Idea was to use JMX; but how does this work if the service is > already running? I can use JMX to start the wrapper, but the wrapper > is alredy running (as Windows service) and I would like to connect > afterwards. I am not sure what you are getting at here? JMX would be running inside the JVM wouldn't it. > other question: > I declared a dependent service. I would appreciate it now, that the > dependent service restarts, if the JVM of the 'mother-service' crashes > and restarts. any possibilities? Let me clarify what you are asking. ServiceB depends on ServiceA. ServiceA is an instance of the Wrapper and a JVM. If the JVM restarts, you would like ServiceB to be restarted? The Wrapper does not currently do that for you. But it sounds like a good feature to provide. Verify that that is what you want and I'll log a feature request for it. I'll need to look into whether or not the Windows ServiceManager allows for that sort of thing.. > and why isn't it possible that windows restarts the wrapper-service if > it crashes (or execute one of the other windows-serivce options, when > the service fails) The service recovery features that Windows provides are designed to restart a service process if it fails. With the Wrapper, the Wrapper process is the service. The JVM is a child process of the Wrapper. If the JVM crashes or is restarted, the Wrapper is taking care of that. From the perspective of Windows, the Wrapper service has never failed. If the Wrapper exits with an error exit code or crashes then the service recovery features can be used to restart the Wrapper just like any other service. Cheers, Leif |