16.2.4. Edit a Bean Pool

Bean pools can be edited using the Management Console.

Procedure 16.5. Edit a bean pool using the Management Console

  1. Click on Profile in the top right, expand the Container item in the Profile panel on the left and select EJB 3. Then select the Bean Pools tab from the main panel.
    EJB3 Bean Pools Panel

    Figure 16.4. EJB3 Bean Pools Panel

  2. Click on the bean pool you wish to edit from the list.
  3. Click the Edit button. The fields in the Details area are now editable.
  4. Edit the details you want to change. Only Max Pool Size, Timeout value, and Timeout unit can be changed.
  5. Click the Save button if you are satisfied with the changes, or click the Cancel link if you want to discard the changes.
    If you click the Ok button, the Details area will change back to it's non-editable form and the bean pool will be updated with the new details.
    If you click the Cancel link, the Details area will change back to it's non-editable form and no changes will be made.

Procedure 16.6. Edit a bean pool using the CLI

  1. 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”.
  2. Use the write_attribute operation with the following syntax for each attribute of the bean pool to be changed.
    /subsystem=ejb3/strict-max-bean-instance-pool=BEANPOOLNAME:write-attribute(name="ATTRIBUTE", value="VALUE")
    • Replace BEANPOOLNAME with the required name for the bean pool.
    • Replace ATTRIBUTE with the name of the attribute to be edited. The attributes that can be edited in this way are max-pool-size, timeout, and timeout-unit.
    • Replace VALUE with the required value of the attribute.
  3. Use the read-resource operation to confirm the changes to the bean pool.
    /subsystem=ejb3/strict-max-bean-instance-pool=BEANPOOLNAME:read-resource

Example 16.4. Set the Timeout Value of a Bean Pool using the CLI

[standalone@localhost:9999 /] /subsystem=ejb3/strict-max-bean-instance-pool=HSBeanPool:write-attribute(name="timeout", value="1500")
{"outcome" => "success"}
[standalone@localhost:9999 /]