Create two thread pools for asynchronous session bean methods in JBoss EAP6?

In my application, I use @Asynchronous business methods in a beans session in two different places. Each has its own logic and requirements, so I would like to configure the maximum thread pool size for each. It seems that JBoss EAP 6.2.2 EAP only allows one asynchronous thread pool.

Is there a way to create two, or do I just need to create a single pool that will be sufficient for both (and lose the ability to limit)?

+6
source share
2 answers

I would expect that you already looked at the documentation at 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_fide-fu_fide_fid

Extract from documents

20.3. Configuring EJB Thread Pools 20.3.1. Enterprise Bean Thread Pools

JBoss EAP 6 maintains the number of instances of Java thread objects in memory for use by enterprise Bean services, including remote call, timer service, and asynchronous call.

This method is called a thread pool. It provides improved performance by eliminating the overhead of creating threads and gives the system administrator a mechanism for managing resource utilization.

Multiple thread pools can be created with different parameters, and a different thread pool can be allocated to each service.

The above snippet would seem to suggest that the following will contain 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> 
+4
source

Source: https://habr.com/ru/post/978089/


All Articles