WAS v8.5 > Script the application serving environment (wsadmin) > Use properties files to manage system configuration > Extracting properties files using wsadmin.sh

Extracting or modifying WCCM object properties

Use wsadmin to extract or modify the properties of an existing WCCM (WebSphere Common Configuration Model) object.

Determine the WCCM object whose properties to extract. In previous releases of the product, extracted properties only contained the most important properties of each object type. You now can extract all the properties of any WCCM object, modify the properties, and then validate and apply the modified properties to a system configuration.

To extract WCCM object properties, use the extractConfigProperties command and specify the WCCM object identifier.

The extracted WCCM object properties file is not portable among environments. If you intend to apply the properties files to installations on different operating systems, modify the extracted properties file to make it portable. See the topic on applying portable properties files across multiple environments.

Also, the extracted properties file does not contain nested objects. You must extract the properties of each nested object independently.

For each of the commands in this topic, we can run in interactive mode by specifying the interactive parameter:

  1. Start the wsadmin scripting tool.

    To start wsadmin using the Jython language, run the following command from the bin directory of the server profile:

      wsadmin -lang jython
  2. Extract WCCM object properties using the createPropertiesFileTemplates command.

    For example, to extract properties for the WCCM SIBus object mySib(cells/myCell04/buses/mySib|sib-bus.xml#SIBus_1250621844296) to a file named mySIBus.props, run the following command:

    AdminTask.extractConfigProperties('mySib(cells/myCell04/buses/mySib|sib-bus.xml#SIBus_1250621844296)',
       '[-propertiesFileName mySIBus.props ]')

    The resulting mySIBus.props file contains extracted properties such as the following:

    #
    ResourceType=SIBus
    ImplementingResourceType=GenericType
    ResourceId=Cell=!{cellName}:SIBus=!{sibus}
    #
    
    #
    #Properties
    #
    secure=false #boolean,default(true)
    uuid=1CAE88EF49150090
    useServerIdForMediations=false #boolean,default(false)
    name=mySib
    interEngineAuthAlias=null
    …
    
    EnvironmentVariablesSection
    #
    #
    #Environment Variables
    sibus=mySib
    cellName=myCell04
  3. Open an editor on the extracted properties file and modify the extracted properties file as needed.

    Ensure the extracted properties file provides suitable values for required parameters.

  4. Apply the properties file using the applyConfigProperties command.

    For example, to apply the mySIBus.props properties file, run following wsadmin command:

      AdminTask.applyConfigProperties('[-propertiesFileName mySIBus.props]')


Results

The administrative command runs and applies the properties file.

Save the changes to your configuration.


Related


Applying portable properties files across multiple environments
Extracting properties files using wsadmin.sh
Validating properties files using wsadmin.sh
Applying properties files using wsadmin.sh
Use properties files to manage system configuration


Reference:

PropertiesBasedConfiguration command group for AdminTask using wsadmin.sh
Properties file syntax


+

Search Tips   |   Advanced Search