users@glassfish.java.net

Re: Embedded GlassFish clean shutdown and restart

From: Harald Wellmann <hwellmann.de_at_gmail.com>
Date: Thu, 27 Sep 2012 19:34:09 +0200

Am 27.09.2012 19:10, schrieb Laird Nelson:
> Guessing they're daemon threads so can't be stopped?
>

Yes, they're all daemon threads. But daemon threads can be stopped like
any other thread, so I don't think that's the point.

If GlassFish starts a number of threads (directly or by creating an
ExecutorService with a thread pool), I'd expect it to join or shutdown
all threads and executors in its shutdown phase.

Otherwise, the next GlassFish instance running in the same VM will
create another thread pool, thus causing a resource leak.

Best regards,
Harald