Java EE 7 offers some good multithreading tools with package javax.enterprise.concurrent
. Is there any limitations when using the thread of ManagedThreadFactory
? Can I just run this thread for infinite or will the server try to clean this up after x period of time?
I can't find much about this.
I have taken a look into JSR-236: https://jcp.org/en/jsr/detail?id=236 and looking into it, it seems running long processes are allowed. In the document at 3.4.1.1.3 they show an example of using a Thread
which runs in a while
loop. Also 3.4.4.2.3 describes about priorities which can be used for long-running processes.
To answer my own question, according to JSR-236 it is allowed to used it for long running processes.