|
From: Leif M. <le...@ta...> - 2006-02-10 03:47:47
|
David,
Could you go back and give this a try with the 3.2.0-d prerelease
version:
http://wrapper.tanukisoftware.org/tmp/3.1.2-d/wrapper-windows-x86-32-3.2.0-d.zip
There have been a few modifications which may fix the problems you were
seeing. The WrapperSimpleApp and WrapperStartStopApp classes were modified
so this should no longer happen, and a wrapper.thread_count_delay
property was
added for other cases.
Cheers,
Leif
DAVID TURNER wrote:
>
> Hi Leif,
>
> The log was for a non-daemon. The log for the daemon method also
> produced an identical log like the previous log with the same line it
> as the below.
>
> INFO | jvm 1 | 2005/12/15 08:58:15 | All non-daemon threads have
> stopped. Exiting.
>
> Here's the main method of the main class. Should this be done
> differently in order to avoid the wrapper from shutting down early?
>
> public static void main(String[] args) {
> Timer timer = new Timer("ConnectionTestTimer", true);
> timer.schedule(new Task1(), 0, 1*60*1000); // 1
> minute
> timer.schedule(new Task2(), 0, 1*60*1000); // 1
> minute
> }
>
>
> Why, if I set up the timer to be a daemon, is the wrapper shutting
> down early? Am I overlooking something?
>
>
>
>
>
> *Leif Mortenson <le...@ta...>*
> Sent by: wra...@li...
>
> 12/15/2005 09:27 AM
> Please respond to
> wra...@li...
>
>
>
> To
> wra...@li...
> cc
>
> Subject
> Re: [Wrapper-user] Wrapper ending after running Timer (TimerTask)
> once as a service
>
>
>
>
>
>
>
>
>
> 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
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>
>
> ========================= NMB (USA) EMAIL NOTICE
> ============================
> The information contained herein may be confidential and proprietary
> and is intended only for
> the use of the addressee. Any unauthorized dissemination or disclosure
> of this communication
> is strictly prohibited. If you have received this communication in
> error, please notify the sender
> immediately. The information herein is not warranted to be free of
> virus or any other defect.
> ==============================================================================
>
|