users@glassfish.java.net

Re: Embedded GlassFish clean shutdown and restart

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Fri, 28 Sep 2012 11:29:52 +0530

On Thursday 27 September 2012 11:04 PM, Harald Wellmann wrote:
> 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
>
>
Yes, this is a bug in our software. Please file one.

Thanks,
Sahoo