Rodrigo
Rodrigo

Reputation: 2503

Does the default Managed Executor Service use the same thread pool used by the general application in Wildfly?

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

Answers (1)

Rodrigo
Rodrigo

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.

Undertow configuration

On the other hand, the Managed Executor Service has its own thread configuration

Managed Executor Service configuration

http://www.mastertheboss.com/jboss-web/jbosswebserver/using-a-custom-thread-pool-for-web-applications-running-on-wildfly

Upvotes: 1

Related Questions