|
From: Leif M. <le...@ta...> - 2003-04-03 01:56:20
|
Jindong, > you guys did a great job!! > Thanks :-) > · The WrapperManager detects if there's any non-daemon threads > other than the current thread and system thread running after the > application is launched, in my case since all my threads are daemon > threads, I had to start another thread in my listener code to run > indefinitely until it receives the stop control from the service > panel...otherwise, the service will be stopped right after it was > started, any other way to get around that ? > The Wrapper should be following the same rules as the regular Java executable when run without the Wrapper. The Wrapper has to do its own thread counting because it starts its own non-daemon thread. If the Wrapper did not do any special counting of the threads, then the JVM would never shutdown. By waiting until there is only one non-daemon thread running, the Wrapper is able to work around this. What happens when you run your application without the Wrapper or its helper classes. If you truly do not have any non-daemon threads running then Java should assume that your application is stopped and exit. That is the difference between daemon and non-daemon threads. What JVM are you running? This may be an issue with a JVM I have not seen before? > · When I use the command line command "net start/stop" to start > / stop the service I installed using wrapper.exe, starting is always > successful without any issue but stopping, on the other hand, I often > get "... service could not be stopped." even though the service has > been stopped indeed...any idea? This problem does not appear to exist > if stopping from the GUI. > I will need more info to tell you the problem without guessing. Could you enable debug output and then post the wrapper.log file that contains both the startup and shutdown of a single run of your application. Delete any existing log file first so you don't send the log of multiple invocations. Cheers, Leif P.S. There is no need to cc the wrapper-cvs list as that just gets me 2 copies of your mail. :-) |