users@glassfish.java.net

[gf-users] Re: Creating and using long lasting threads

From: Oleksiy Stashok <oleksiy.stashok_at_oracle.com>
Date: Mon, 29 Dec 2014 09:51:13 -0800

Hi Mladen,

are you sure this "long lasting thread detected...." is really related
to your thread? It might be just admin console issue.
Even though creating your own thread might be a bad idea, still I don't
see a reason why it shouldn't work.

WBR,
Alexey.

On 28.12.14 23:54, Mladen Adamović wrote:
> Hi,
>
> Our webapp creates several background long lasting threads (almost
> permanent).
> Those threads are worker threads which are synchronized and designed
> for performance, no dead locks and fastest user experience.
>
> However, it seems that Glassfish doesn't love long lasting threads
> when a Servlet opens a thread with new Thread(something).start()
> glassfish admin console might hand with "long lasting thread
> detected....".
>
> Any way to suggest to Glassfish that those threads are app based
> background threads?
> Maybe setting then to "Deamon" would do, but those deamon threads
> might prevent JM to shutdown.
>
>