Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Use properties files to manage system configuration > Manage specific configuration objects using properties files > Work with server properties files
Work with application server properties files
We can use properties files to create or change application server properties and the associated StateManageable instance under a server.
Determine the changes to make to the application server configuration.
Start wsadmin.sh.
To start wsadmin using the Jython language, run...
WP_PROFILE/bin/wsadmin -lang jython
Use a properties file, you can create, modify, or delete an application server properties.
Run administrative commands using wsadmin to create or change a properties file for an application server, validate the properties, and apply them to the configuration.
Actions for application server properties files. We can create, modify, and delete application server properties.
Action Procedure create Not available modify Edit properties and then run applyConfigProperties. delete Not available create Property Set properties and then run applyConfigProperties. delete Property Run deleteConfigProperties. Optionally, you can use interactive mode with the commands:
AdminTask.command_name('-interactive')
Procedure
- Modify a properties file for an ApplicationServer object.
- Obtain a properties file for the application server to change.
We can extract a properties file for an ApplicationServer using the extractConfigProperties command.
- Open the properties file in an editor and change the properties as needed.
For example, modify the ApplicationServer and associated StateManageable under a server. The following properties file shows a property under ApplicationServer with name myName and value myVal:
# # Header # ResourceType=ApplicationServer ImplementingResourceType=ApplicationServer ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer= AttributeInfo=components # # #Properties # applicationClassLoaderPolicy=MULTIPLE #ENUM(MULTIPLE|SINGLE),default(MULTIPLE) name=null applicationClassLoadingMode=PARENT_FIRST #ENUM(PARENT_FIRST|PARENT_LAST),default(PARENT_FIRST) server=!{serverName} parentComponent=null id=-1 #long,default(-1) # # Header # ResourceType=StateManageable ImplementingResourceType=ApplicationServer ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer=:StateManageable= AttributeInfo=stateManagement # # #Properties # initialState=START #ENUM(STOP|START),default(START) managedObject=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer= #ObjectName(ApplicationServer),readonly # # Header # ResourceType=ApplicationServer ImplementingResourceType=ApplicationServer ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer= AttributeInfo=properties(name,value) # # #Properties # myName=myVal # EnvironmentVariablesSection # #Environment Variables cellName=WASCell06 serverName=myServer nodeName=WASNode04- Run applyConfigProperties to change an application server configuration and create any new properties.
Run applyConfigProperties 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 application server 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
We can use the properties file to configure and manage the application server object.
What to do next
Save the changes to the configuration.
Extract properties files using wsadmin.sh
Create server, cluster, application, or authorization group objects using properties files and wsadmin scripting
Delete server, cluster, application, or authorization group objects using properties files
Related
PropertiesBasedConfiguration command group using wsadmin.sh