users@glassfish.java.net

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

From: Mladen Adamović <mladen.adamovic_at_gmail.com>
Date: Tue, 30 Dec 2014 10:42:37 +0100

On Mon, Dec 29, 2014 at 6:51 PM, Oleksiy Stashok <oleksiy.stashok_at_oracle.com
> wrote:

> are you sure this "long lasting thread detected...." is really related to
> your thread? It might be just admin console issue.
>

It might be just admin console issue, I haven't experienced it otherwise.
That issue used to make admin console hung sometimes.


> Even though creating your own thread might be a bad idea, still I don't
> see a reason why it shouldn't work.
>

It works, you are right.



> 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.
>>
>>
>>
>