Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
21.3. Configuring EJB Thread Pools
21.3.1. Enterprise Bean Thread Pools Link kopierenLink in die Zwischenablage kopiert!
21.3.2. Create a Thread Pool Link kopierenLink in die Zwischenablage kopiert!
Procedure 21.10. Create an EJB Thread Pool using the Management Console
- Login to the Management Console. Section 3.3.2, “Log in to the Management Console”
- Click on the tab at the top of the screen.
- Expand the menu and select .
- Select the tab and click .
- Specify the Name and Max Threads values.
- Click to finish.
Procedure 21.11. Create a Thread Pool using the CLI
- Launch the CLI tool and connect to your server. Refer to Section 3.4.4, “Connect to a Managed Server Instance Using the Management CLI”.
- Use the
addoperation with the following syntax./subsystem=ejb3/thread-pool=THREAD_POOL_NAME:add(max-threads=MAX_SIZE)
/subsystem=ejb3/thread-pool=THREAD_POOL_NAME:add(max-threads=MAX_SIZE)Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Replace THREAD_POOL_NAME with the name of the thread pool.
- Replace MAX_SIZE with the maximum size of the thread pool.
- Use the
read-resourceoperation to confirm the creation of the bean pool./subsystem=ejb3/thread-pool=THREAD_POOL_NAME:read-resource
/subsystem=ejb3/thread-pool=THREAD_POOL_NAME:read-resourceCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Example 21.7. Create a Thread Pool using the CLI
[standalone@localhost:9999 /] /subsystem=ejb3/thread-pool=my-test-pool:add(max-threads=20)
{"outcome" => "success"}
[standalone@localhost:9999 /] /subsystem=ejb3/thread-pool=my-test-pool:add(max-threads=20)
{"outcome" => "success"}
Example 21.8. XML Configuration Sample
21.3.3. Remove a Thread Pool Link kopierenLink in die Zwischenablage kopiert!
Prerequisites
- The thread pool that you want to remove cannot be in use. Refer to the following tasks to ensure that the thread pool is not in use:
Procedure 21.12. Remove an EJB thread pool using the Management Console
- Login to the Management Console. Section 3.3.2, “Log in to the Management Console”.
- Click on the tab at the top of the screen. Expand the menu and select . Select the tab.
- Select the thread pool to you want to remove.
- Click . The Remove Item dialog appears.
- Click .
Procedure 21.13. Remove a thread pool using the CLI
- Launch the CLI tool and connect to your server. Refer to Section 3.4.4, “Connect to a Managed Server Instance Using the Management CLI”.
- Use the
removeoperation with the following syntax./subsystem=ejb3/thread-pool=THREADPOOLNAME:remove
/subsystem=ejb3/thread-pool=THREADPOOLNAME:removeCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Replace THREADPOOLNAME with the name of the thread pool.
Example 21.9. Removing a Thread Pool using the CLI
[standalone@localhost:9999 /] /subsystem=ejb3/thread-pool=ACCTS_THREADS:remove
{"outcome" => "success"}
[standalone@localhost:9999 /] /subsystem=ejb3/thread-pool=ACCTS_THREADS:remove
{"outcome" => "success"}
21.3.4. Edit a Thread Pool Link kopierenLink in die Zwischenablage kopiert!
Procedure 21.14. Edit a Thread Pool using the Management Console
- Login to the Management Console. Section 3.3.2, “Log in to the Management Console”.
- Click on the tab at the top of the screen. Expand the menu and select . Select the tab.
- Select the thread pool you want to edit.
- Click .
- Edit the details you want to change. Only the
Thread Factory,Max Threads,Keepalive Timeout, andKeepalive Timeout Unitvalues can be edited. - Click to finish.
Procedure 21.15. Edit a thread pool using the CLI
- Launch the CLI tool and connect to your server. Refer to Section 3.4.4, “Connect to a Managed Server Instance Using the Management CLI”.
- Use the
write_attributeoperation with the following syntax for each attribute of the thread pool to be changed./subsystem=ejb3/thread-pool=THREADPOOLNAME:write-attribute(name="ATTRIBUTE", value="VALUE")
/subsystem=ejb3/thread-pool=THREADPOOLNAME:write-attribute(name="ATTRIBUTE", value="VALUE")Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Replace THREADPOOLNAME with the name of the thread pool.
- Replace ATTRIBUTE with the name of the attribute to be edited. The attributes that can be edited in this way are
keepalive-time,max-threads, andthread-factory. - Replace VALUE with the required value of the attribute.
- Use the
read-resourceoperation to confirm the changes to the thread pool./subsystem=ejb3/thread-pool=THREADPOOLNAME:read-resource
/subsystem=ejb3/thread-pool=THREADPOOLNAME:read-resourceCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Important
keepalive-time attribute with the CLI the required value is an object representation. It has the following syntax.
/subsystem=ejb3/thread-pool=THREADPOOLNAME:write-attribute(name="keepalive-time", value={"time" => "VALUE","unit" => "UNIT"}
/subsystem=ejb3/thread-pool=THREADPOOLNAME:write-attribute(name="keepalive-time", value={"time" => "VALUE","unit" => "UNIT"}
Example 21.10. Set the Maxsize Value of a Thread Pool using the CLI
[standalone@localhost:9999 /] /subsystem=ejb3/thread-pool=HSThreads:write-attribute(name="max-threads", value="50")
{"outcome" => "success"}
[standalone@localhost:9999 /] /subsystem=ejb3/thread-pool=HSThreads:write-attribute(name="max-threads", value="50")
{"outcome" => "success"}
Example 21.11. Set the keepalive-time Time Value of a Thread Pool using the CLI
[standalone@localhost:9999 /] /subsystem=ejb3/thread-pool=HSThreads:write-attribute(name="keepalive-time", value={"time"=>"150"})
{"outcome" => "success"}
[standalone@localhost:9999 /] /subsystem=ejb3/thread-pool=HSThreads:write-attribute(name="keepalive-time", value={"time"=>"150"})
{"outcome" => "success"}