Jul 162012
#-- Configuring EJB container 
set aServer [$AdminConfig getid /Node:$nodeName/Server:$serverName/]
set aEJB [$AdminConfig list EJBContainer $aServer]

# setting up EJBContainer properties
# cleanup interval is specified in milliseconds
set ejbCacheAttr [list cacheSettings [list [list cacheSize 4000] [list cleanupInterval 5000]]]
# specify the JNDI name for an existing data source
set dsJNDIAttr [list defaultDatasourceJNDIName ds/myds]
set ipciAttr [list inactivePoolCleanupInterval 20000]
set nameAttr [list name MyEJB]
set pdAttr [list passivationDirectory /temp/mydir]
set initStateAttr [list stateManagement [list [list initialState STOP]]]
set EJBContainerAttrs [list $ejbCacheAttr $dsJNDIAttr $ipciAttr $nameAttr $pdAttr $initStateAttr]

# check if there is existing EJB container
if {[llength $aEJB] != 0} {
# modifying existing EJB container
puts "Modifying existing EJB container"
$AdminConfig modify $aEJB $EJBContainerAttrs
puts [$AdminConfig showall $aEJB]
} else {
# create an EJB container object
puts "Create a EJB container"
set aEJB [$AdminConfig create EJBContainer $aServer $EJBContainerAttrs]
puts [$AdminConfig showall $aEJB]
$AdminConfig save
© Incase of any copyright infringements please check copyrights page for faster resolutions.

Leave a Reply

Show Buttons
Hide Buttons