Example: Configuring an enterprise bean container using wsadmin
An example of viewing and modifying an enterprise bean (EJB) container of an application server follows:
- Identify the application server and assign it to the server variable.
set server [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]Example output:
server1(cells/mycell/nodes/mynode/servers/server1:server.xml#Server_1)- Identify the EJB container belonging to the server and assign it to the ejbContainer variable.
set ejbContainer [$AdminConfig list EJBContainer $server]Example output:
(cells/mycell/nodes/mynode/servers/server1:server.xml#EJBContainer_1)- View all the attributes of the EJB container.
The following example command does not show nested attributes:
$AdminConfig show $ejbContainerExample output:{cacheSettings (cells/mycell/nodes/myode/servers/server1:server.xml#EJBCache_1)} {components {}} {inactivePoolCleanupInterval 30000} {parentComponent (cells/mycell/nodes/myode/servers/server1:server.xml#ApplicationServer_1) {passivationDirectory ${USER_INSTALL_ROOT}/temp} {properties {}} {services {(cells/mycell/nodes/myode/servers/server1:server.xml#MessageListenerService_1)} {stateManagement (cells/mycell/nodes/mynode/servers/server1:server.xml#StateManageable_10)}The following example command includes nested attributes:
$AdminConfig showall $ejbContainerExample output:{cacheSettings {{cacheSize 2053} {cleanupInterval 3000}}} {components {}} {inactivePoolCleanupInterval 30000} {parentComponent (cells/mycell/nodes/mynode/servers/server1:server.xml#ApplicationServer_1)} {passivationDirectory ${USER_INSTALL_ROOT}/temp} {properties {}} {services {{{context (cells/mycell/nodes/mynode/servers/server1:server.xml#EJBContainer_1)} {listenerPorts {}} {properties {}} {threadPool {{inactivityTimeout 3500} {isGrowable false} {maximumSize 50} {minimumSize 10}}}}}} {stateManagement {{initialState START} {managedObject (cells/mycell/nodes/mynode/servers/server1:server.xml#EJBContainer_1)}}}- Modify the attributes.
The following example command modifies the EJB cache settings which are nested attributes:
&AdminConfig modify $ejbContainer {{cacheSettings {{cacheSize 2500} {cleanupInterval 3500}}}}The following example command modifies the cleanup interval attribute:
$AdminConfig modify $ejbContainer {{inactivePoolCleanupInterval 15000}}- Save the changes with the following command:
$AdminConfig save