Modify an enterprise bean container using wsadmin

 

Using Jacl:

set serverId [$AdminConfig getid /Cell:cellname/Node:nodename/Server:Server/]

set ejbContainer [$AdminConfig list EJBContainer $serverId]


### View all the attributes of the EJB container.  
### Do not show nested attributes...

$AdminConfig show $ejbContainer


### View all the attributes of the EJB container.  
### Include nested attributes...

$AdminConfig showall $ejbContainer


### Modify EJB cache settings 

$AdminConfig modify $ejbContainer  \
{                                  \
    {cacheSettings                 \
       {                           \
         {cacheSize 2500}          \
         {cleanupInterval 3500}    \
       }                           \
    }                              \
}


### Modify the cleanup interval attribute...

$AdminConfig modify $ejbContainer 
{
    {inactivePoolCleanupInterval 15000}
}



### Save changes
$AdminConfig save

 

Using Jython

### Identify the appsserver and assign it to 
### the server variable.

serverId = AdminConfig.getid('/Cell:cell/Node:node/Server:ServerName/')
print serverId

### Identify the EJB container belonging to the server 
### and assign it to the ejbContainer variable.

ejbContainer = AdminConfig.list('EJBContainer', serverId)
print ejbContainer

### Do not include nested attributes...
print AdminConfig.show(ejbContainer)

### Include nested attributes...

print AdminConfig.showall(ejbContainer)

### Modify  the EJB cache settings which are nested attributes...
AdminConfig.modify(ejbContainer, [['cacheSettings', [['cacheSize', 2500],  ['cleanupInterval', 3500]]]])

### Modify the cleanup interval attribute...
AdminConfig.modify(ejbContainer, [['inactivePoolCleanupInterval', 15000]])

AdminConfig.save()