Reputation: 2503
I use a Managed Executor Service in a JavaEE Web application deployed on Wildfy 21. The goal is execute a long timing task in other thread in order to free the thread used by the server to respond the requests of the clients (HTTP requests).
I am using the default executor service configured in Wildfly:
@Resource(lookup = "java:jboss/ee/concurrency/executor/default")
public void setExecutorService(ManagedExecutorService executorService) {
this.executorService = executorService;
}
Does the default managed executor service use the same thread pool used to handle the HTTP Requests? Or a new thread pool is created by Widfly to be used by the Managed Executor Service?
I read the Widlfy documentation, but I didn't find the anwser.
Upvotes: 0
Views: 1629
Reputation: 2503
No, it doesn't.
The Managed Executor Service uses a thread pool different from that used to handle the HTTP requests.
The HTTP requests are handled by the Web (Undertow) subsystem which uses the threads defined in a Worker.
On the other hand, the Managed Executor Service has its own thread configuration
Upvotes: 1