Previous | Home | Next
Properties file based configuration
Overview
The use of a properties file-based configuration provides a way to simplify administrative tasks using wsadmin. WAS configuration can be extracted into a single file and any configuration attribute can be located in that file in the form of name/value pair properties.
![]()
Properties-based configuration is not a replacement for configarchive tools; rather, it complements them. The properties extracted from the configuration only contain the most commonly used configuration attributes and will not contain the entire configuration. Whereas, configarchive contains an exact copy of the configuration and can be applied to another system to achieve an exact replica.
Commands
The following commands in the PropertiesBasedConfiguration command group implement this type of configuration:
- extractConfigProperties
- validateConfigProperties
- applyConfigProperties
- deleteConfigProperties
- createPropertiesFileTemplates
Properties file-based configuration extracts configuration data to one file...
# SubSection 1.0 # JDBCProvider attributes # ResourceType=JDBCProvider ImplementingResourceType=JDBCProvider ResourceId=Cell=!{cellName}:JDBCProvider=ID#builtin_jdbcprovider # # Properties # classpath={${DERBY_JDBC_DRIVER_PATH}/derby.jar} name=Derby JDBC Provider (XA) implementationClassName=org.apache.derby.jdbc.EmbeddedXADataSourcenativepath={} description=Built-in Derby JDBC Provider (XA) providerType=Derby JDBC Provider (XA) #readonlyxa=true #booleanWe can make changes to the attributes, validate changes, and then applying them to the server. We can also create or delete configuration objects.
The wsadmin commands for properties based configuration
AdminTask.extractConfigProperties('-configData Node=myNode -propertiesFileName myNodeProperties.props') AdminTask.validateConfigProperties('-propertiesFileName myNodeProperties.props -reportFile report.txt') AdminTask.applyConfigProperties('-propertiesFileName myPropFile.props -validate true') AdminTask.deleteConfigProperties('-propertiesFileName myPropFile.props') AdminTask.createPropertiesFileTemplates('-propertiesFileName serverTemplate.props -configType Server')Because it is not possible to modify every configuration using properties file-based configuration, do not use this tool for backup and recovery. Use the BackupConfig and RestoreConfig commands in the WAS_HOME/bin directory as the main backup and recovery tools.
extractConfigProperties
Extract configuration data in the form of a simple properties file. If no configuration object is specified, the entire profile's configuration data is extracted into the properties file. All environment specific values (cellName, serverName, nodeName, clusterName, coreGroup, nodeGroup, authorizationGroup, and so on) will be expressed as variables. These variables will be stored at the end of the generated properties file. TargetObject is the ConfigId of the config object. Not required if configData parameter is used.
Parameters...
propertiesFileName (String, optional) Name of properties file. This is a required parameter. configData (String, optional) Config object instance in the form (Node=node1). filterMechanism (String, optional) Valid values are All (default), NO_SUBTYPES, SELECTED_SUBTYPES. selectedSubTypes (String[], optional) Should be supplied if SELECTED_SUBTYPES is chosen for filterMechanism. Subtypes (config types) within the config object selected under configData parameter. ReturnValue is propertiesFile, and is filled with configuration properties
Examples:
Interactive mode (Jython):
AdminTask.extractConfigProperties ('[-interactive]')
Batch mode (Jython):
AdminTask.extractConfigProperties('["-propertiesFileName" "my.props", "-configData" "Node=node1"]')
Properties file-based configuration