16.3.2. Create a Thread Pool
Procedure 16.9. Create an EJB Thread Pool using the Management Console
- Login to the Management Console. Section 3.2.2, “Log in to the Management Console”
- Click on in the top right, expand the item in the Profile panel on the left and select . Then select the tab from the main panel.

Figure 16.6. EJB3 Thread Pools Panel
- Click the button. The Add EJB3 Thread Pools dialog appears.
- Specify the required details, Name, Max. Threads, and Keep-Alive Timeout value.
- Click on the button to save the new thread pool or click the link to abort the procedure.
- If you click the button, the dialog will close and the new thread pool will appear in the list.
- If you click , the dialog will close and no new thread pool will be created.
Procedure 16.10. Create a Thread Pool using the CLI
- Launch the CLI tool and connect to your server. Refer to Section 3.3.4, “Connect to a Managed Server Instance Using the Management CLI”.
- Use the
addoperation with the following syntax./subsystem=ejb3/thread-pool=THREADPOOLNAME:add(max-threads=MAXSIZE, keepalive-time={"time"=>"TIME", "unit"=>UNIT"})- Replace THREADPOOLNAME with the required name for the thread pool.
- Replace MAXSIZE with the maximum size of the thread pool.
- Replace UNIT with the required time unit to be used for the required keep-alive time. Allowed values are:
NANOSECONDS,MICROSECONDS,MILLISECONDS,SECONDS,MINUTES,HOURS, andDAYS. - Replace TIME with the integer value of the required keep-alive time. This value is a number of UNITs.
- Use the
read-resourceoperation to confirm the creation of the bean pool./subsystem=ejb3/strict-max-bean-instance-pool=THREADPOOLNAME:read-resource
Example 16.7. Create a Thread Pool using the CLI
[standalone@localhost:9999 /] /subsystem=ejb3/thread-pool=testmepool:add(max-threads=50, keepalive-time={"time"=>"150", "unit"=>"SECONDS"})
{"outcome" => "success"}
[standalone@localhost:9999 /]Example 16.8. XML Configuration Sample
<subsystem xmlns="urn:jboss:domain:ejb3:1.2">
<thread-pools>
<thread-pool name="default" max-threads="20" keepalive-time="150"/>
</thread-pools>
</subsystem>
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.