|
From: Leif M. <le...@ta...> - 2005-12-15 14:27:35
|
David,
From your log, the Wrapper is exiting because it has determined that
all non-daemon
threads have terminated. You mentioned that you tried running your
program with
the timer thread set as a daemon and as a non-daemon. Which was the log you
posted from?
Here is the line in the log which gives the reason why the Wrapper
is exiting the JVM:
INFO | jvm 1 | 2005/12/15 08:58:15 | All non-daemon threads have
stopped. Exiting.
Have you tried adding debug output into your Timer thread to make
sure that it is
indeed still running? I can't think of anything that would be
different in this case about
running as a service vs running in a console.
Is it possible that an exception is being thrown that is causing the
timer thread to be
terminated? Is there any code which would be preventing any exceptions
from being
logged?
I usually do the following in my runner threads just to make sure
that they never exit
without me knowing about it. (I use a logging tool however)
public void run() {
System.out.println( "Runner started." );
try {
while( !stopping ) {
// Loop
}
} finally {
System.out.println( "Runner terminated" );
}
}
Cheers,
Leif
DAVID TURNER wrote:
>
> I've included the contents of wrapper.log after setting the
> wrapper.debug to true.
>
> One thing I want to mention is that I tried to set the java.util.Timer
> both as a daemon and a non-daemon. The outcome is the same for both,
> and that the nt service (wrapper) stops after one execution of the
> TimerTask.
>
>
> DEBUG | wrapper | 2005/12/15 08:57:21 | Service command:
> C:\MyProjects\connection-monitor\packaged\connection-monitor\bin\wrapper.exe
> -s
> C:\MyProjects\connection-monitor\packaged\connection-monitor\bin\..\conf\wrapper.conf
>
> STATUS | wrapper | 2005/12/15 08:57:22 | Connection Monitor installed.
> STATUS | wrapper | 2005/12/15 08:58:06 | --> Wrapper Started as Service
> DEBUG | wrapper | 2005/12/15 08:58:06 | Using system timer.
> DEBUG | wrapperp | 2005/12/15 08:58:06 | server listening on port 32000.
> STATUS | wrapper | 2005/12/15 08:58:06 | Launching a JVM...
snip
|