You can use properties files to change Enterprise JavaBeans (EJB) container properties
and associated stateManagement, cacheSettings and timerSettings attributes
under a server.
Before you begin
Determine the changes that you want to make to your EJB
container configuration or its configuration objects.
Start
the wsadmin scripting tool. To start wsadmin using the Jython language,
run the wsadmin -lang jython command from the bin directory
of the server profile.
About this task
Using a properties file, you can modify an EJB container
object and its configuration properties.
Run administrative
commands using wsadmin to change a properties file for an EJB container,
validate the properties, and apply them to your configuration.
Table 1. Actions for EJB container
properties files. You can create, modify and delete EJB
container properties.Action |
Procedure |
create |
Not available |
modify |
Edit properties and then run the applyConfigProperties command. |
delete |
Not available |
create Property |
Set properties and then run the applyConfigProperties command. |
delete Property |
To delete one or more properties, run deleteConfigProperties with
only those properties to delete in the properties file. |
Optionally, you can use interactive mode with the commands:
AdminTask.command_name('-interactive')
Procedure
- Create or edit EJB container properties under a server.
- Specify EJBContainer properties in a properties file.
Open an editor on a properties file. Example properties
for an EJBContainer under a server follow. A property under EJBContainer
has a name of myName and a value of myVal.
You can copy the example properties into an editor and modify the stateManagement, cacheSettings and timerSettings attributes
under the server as needed for your situation.
#
# SubSection 1.0 # EJBContainer
#
ResourceType=EJBContainer
ImplementingResourceType=EJBContainer
ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer=:EJBContainer=
AttributeInfo=components
#
#
#Properties
#
EJBTimer={} #ObjectName*(null)
name=null
defaultDatasourceJNDIName=null
inactivePoolCleanupInterval=30000 #long,default(30000)
passivationDirectory="${USER_INSTALL_ROOT}/temp" #required
enableSFSBFailover=false #boolean,default(false)
server=null
parentComponent=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer= #ObjectName(ApplicationServer),readonly
#
# SubSection 1.0.1 # EJBContainer State Management
#
ResourceType=StateManageable
ImplementingResourceType=EJBContainer
ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer=:EJBContainer=:StateManageable=
AttributeInfo=stateManagement
#
#
#Properties
#
initialState=START #ENUM(STOP|START),default(START)
managedObject=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer=:EJBContainer= #ObjectName(EJBContainer),readonly
#
# SubSection 1.0.3 # EJBTimer
#
ResourceType=EJBTimer
ImplementingResourceType=EJBContainer
ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer=:EJBContainer=:EJBTimer=
AttributeInfo=timerSettings
#
#
#Properties
#
tablePrefix=EJBTIMER_
pollInterval=300 #long,default(300)
numAlarmThreads=1 #long,default(1)
schedulerJNDIName=null
datasourceJNDIName="jdbc/DefaultEJBTimerDataSource"
datasourceAlias=null
#
# SubSection 1.0.5 # EJBCache
#
ResourceType=EJBCache
ImplementingResourceType=EJBContainer
ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer=:EJBContainer=:EJBCache=
AttributeInfo=cacheSettings
#
#
#Properties
#
cleanupInterval=3000 #long,default(3000)
cacheSize=2053 #long,default(2053)
#
# Header
#
ResourceType=EJBContainer
ImplementingResourceType=EJBContainer
ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer=:EJBContainer=
AttributeInfo=properties(name,value)
#
#
#
#Properties
#
myName=myVal
#
EnvironmentVariablesSection
#
#Environment Variables
cellName=WASCell06
serverName=myServer
nodeName=WASNode04
- Run the applyConfigProperties command
to change an EJBContainer configuration.
Running
the applyConfigProperties command applies the properties
file to the configuration. In this Jython example, the optional -reportFileName parameter
produces a report named report.txt:
AdminTask.applyConfigProperties(['-propertiesFileName myObjectType.props -reportFileName report.txt'])
- Delete EJB container properties.
To delete
one or more properties, specify only those properties to delete in
the properties file and run deleteConfigProperties;
for example:
AdminTask.deleteConfigProperties('[-propertiesFileName myObjectType.props -reportFileName report.txt]')
Results
You can use the properties file to configure and manage
the EJB container properties.
What to do next
Save the changes to your configuration.