In my application I use @Asynchronous business methods on session beans in two different places. Each has its own logic and requirements so ideally I'd like to configure a maximum thread pool size for each. It looks like JBoss EAP 6.2.2 EAP only allows one asynchronous thread pool.
Is there a way to create two, or do I just have to create a single pool that will have enough for both (and lose the ability to limit either)?
I would expect that you have already looked at documentation on https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.2/pdf/Administration_and_Configuration_Guide/JBoss_Enterprise_Application_Platform-6.2-Administration_and_Configuration_Guide-en-US.pdf
Extract from docs
20.3. Configuring EJB Thread Pools 20.3.1. Enterprise Bean Thread Pools
JBoss EAP 6 maintains number of instances of Java thread objects in memory for use by enterprise bean services, including remote invocation, the timer service, and asynchronous invocation.
This technique is called thread pooling. It provides improved performance by eliminating the overhead of thread creation and gives the system administrator a mechanism for controlling resource usage.
Multiple thread pools can be created with different parameters and each service can be allocated a different thread pool.
The above extract would seem to suggest that the following will provide 2 thread pools named first and second.
<thread-pools>
<thread-pool name="first" max-threads="20" keepalive-time="150"/>
<thread-pool name="second" max-threads="20" keepalive-time="150"/>
</thread-pools>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With