|
From: Leif M. <le...@ta...> - 2003-01-20 15:33:56
|
Martin,
I started responding before reading all the way to the bottom. You
actually
understand the problem perfectly.
The Wrapper does the same the thing as the JVM normally does to decide
when the application is ready to quit. It counts the active threads.
With the IBM
and Sun JVMs, this list contains a single thread which is started as
soon as the
main thread terminates. I believe this thread then waits for all other
non daemon
threads to terminate at which point it calls System.exit.
So the Wrapper always wait until there is only 1 other non-daemon
thread rather
than 0 to account for that system thread. It may be that the JRockit
JVM does not
work the same way? Most likely that system thread does not show up in
the thread
list.
Assuming that is the case, then I will have to add a special case
for JRockit so
it will wait for a thread count of 0 for JRockit and 1 for all other
JVMs. The count of
1 works for Blackdown, IBM and Sun JVMs. I have not tried any others.
Anyway. I think I fixed the problem I am now looking at the
resolved full version
of the JVM. If it contains "JRockit" then the system thread count is
set to 0.
Otherwise it is set to 1.
I uploaded a temporary release at the following URL. It also
contains several
other fixes, so take a look at the release notes. I would like to get a
new release
out soon, so please let me know whether or not this fixes your problem.
Ie. Make
sure it works on both Sun and JRockit for your application. I tested
the Sun JVM
here. But I am going to have to rely on you for the JRockit testing :-)
http://www.tanukisoftware.com/wrapper_2.3.0c_src_with_doc_src.zip
http://www.tanukisoftware.com/wrapper_win32_2.3.0c.zip
Thanks for the great report.
Cheers,
Leif
|