Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Use properties files to manage system configuration


Run administrative commands using properties files

Use wsadmin.sh to run an existing administrative command using properties file based configuration. The command must not contain a parameter that uses a complex data type. Supported parameter types are basic types such as String, Long, Integer, Float, Double, Boolean, Character, Short, Byte, URL, and ObjectName, and complex types such as Array of basic types, Properties, DownLoadFile, and UpLoadFile.

Determine the administrative command to run. Ensure that all parameters in the command use only a supported data type.

We can extract the properties that are required to run a command using the createPropertiesFileTemplates command. Specify GenericType for the configType parameter and a commandName option.

After extracting a properties file for a command, edit the properties file as needed, and then validate and apply the properties file.

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

AdminTask.command_name('-interactive')


Procedure

  1. Start wsadmin.sh.

    wsadmin -lang jython
    

  2. Extract the properties that are required to run the administrative command.

    To extract the properties that are required to run a command, use the createPropertiesFileTemplates command. Specify GenericType for the configType parameter and commandName command_name for the options parameter.

    For example, to extract properties for the createSIBus command to a file named createSIBus.props...

    AdminTask.createPropertiesFileTemplates('[-propertiesFileName createSIBus.props
      -configType GenericType -options [[commandName createSIBus]] ]')
    

    The resulting createSIBus.props file contains the following extracted properties:

    #
    CreateDeleteCommandProperties=true
    #SKIP=true
    commandName=createSIBus
    #
    
    #
    #Properties
    #
    busSecurity=false #Boolean
    highMessageThreshold=null #Long
    bus=myBus #String,required
    …
    

  3. Open an editor on the extracted properties file and modify the extracted properties file as needed.

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

  4. Apply the properties file using applyConfigProperties.

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

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


Results

The administrative command runs and applies the properties file.


What to do next

Save the changes to the configuration.
Extract properties files using wsadmin.sh
Validate properties files using wsadmin.sh
Apply properties files using wsadmin.sh
Use properties files to manage system configuration


Related


PropertiesBasedConfiguration command group using wsadmin.sh
Properties file syntax

+

Search Tips   |   Advanced Search