How to specify a custom task worker thread pool for the specific web application in JBoss EAP 7/8
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.x
- 8.x
Issue
- How do I specify a custom task worker thread pool for the specific web application in JBoss EAP 7 or EAP 8?
- I would like to separate task worker thread pool for each web application. I know I can configure multiple task worker thread pools in IO subsystem. How do I specify the specific web application to use the task worker thread pool?
Resolution
You can specify <executor-name> in your WEB-INF/jboss-web.xml to configure your application to use a specific task worker thread pool instead of the default task worker thread pool.
For example, configure a new task worker thread pool named custom-worker in the io subsystem in your standalone.xml:
<subsystem xmlns="urn:jboss:domain:io:3.0">
<worker name="default"/>
<worker name="custom-worker"/>
<buffer-pool name="default"/>
</subsystem>
then you can add WEB-INF/jboss-web.xml in your application war and specify <executor-name>custom-worker</executor-name> like the following:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<executor-name>custom-worker</executor-name>
</jboss-web>
SBR
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.