|
From: Daniel S. <jav...@da...> - 2004-07-14 14:27:15
|
Leif Mortenson wrote: > Daniel Schaedler wrote: > > 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 Yes, that's exactly what I'm interested in. >> 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. yes. I hoped there is a possibility to use JMX without changing any code of my application within the wrapper...I'l take the WrapperManager now to communicate with the wrapper (and have to change some code, of course) >> 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? exactly! I think this makes sense, because the wrapper itself does not have any functionality in general. If you have to restart your application you normaly also have to restart the dependent services. > 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.. I think it does. If you restart ServiceA (example above) Windows automaticaly stops ServiceB -> Stops ServiceA -> starts ServiceA -> Starts ServiceB. > 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. I see. So if I kill the wrapper, there is obviously no exit code and Windows has no chance to know that the service has crashed.. thanks Daniel |