ThreadPoolExecutor in JEE application server
843833Feb 27 2007 — edited Feb 27 2007Our application runs inside a jee application server.
We have tasks (implemented as a pojo) that need to be queued and executed by asynchronous threads.
We came across the new java.util.concurrent.ThreadPoolExecutor,
which seems to be exactly what we need.
However, as far as we know threads should be created ONLY by the jee application server.
Does this mean we can't use the ThreadPoolExecutor class in a jee application server?
If so what is the best practise for queueing tasks that need to be executed by a configurable pool of worker threads?
p.s
We are aware that JMS is also an option, but it entails a bit of an overhead in our case because the tasks are INTERNAL to the local application server ( so there is no need for messaging between 2 application servers).
thanks
John