|
From: Daniel W. <ma...@gm...> - 2010-02-20 14:31:29
|
So, the problem finaly needs to be fixed. Haven't worked a while with the wrapper and the service it controls. In the previous mail you told me to use a WrapperServiceControlEvent. For my service i'm using method 4 because the app/service can run as configurable jar. But now i have no idea how to integrate or act on wrapper events. Basically i need the wrapper to stop the service if a standby/hibernate request is coming in. when the system is resuming normal operation the wrapper should restart the service. This should solve my com port issues. Can this be configured in my wrapper.conf or how can i listen to the events, because my app doesn't and should not know anything about the wrapper. Any advice is appreciated. regards Daniel Leif Mortenson schrieb: > Daniel, > Sorry for the delay. The Wrapper actually supports Windows POWER > events and will fire events in the JVM to give your application a > chance to respond to them. Please see the WrapperServiceControlEvent > class in javadocs for details on the events that can be processed. > > http://wrapper.tanukisoftware.org/doc/english/javadocs.html?org/tanukisoftware/wrapper/event/WrapperServiceControlEvent.html > > The various events can be handled by passing a WrapperEventListener > instance to the WrapperManager.addWrapperEventListener(...) method. > Please take a look at the Javacocs for details and let me know how it > works for you or if you have any questions getting things working. > > Cheers, > Leif > > > On Sat, Dec 5, 2009 at 12:15 AM, Daniel Weinand <ma...@gm...> wrote: > >> Hello, >> >> is it possible to stop a Windows service before the computer enters standby? >> my application is polling hardware via an virtual com port. every time the computer >> wakes up the service is up and running again. but the com port is blocked by another >> app instance. >> >> i know this is not entirely related to the wrapper. but for now i have no idea >> how to solve my problem. any hints? >> >> regards >> > > |