IBM


5.2.3 Configuring wsadmin

The properties that determine the scripting environment for wsadmin can be set using either the command line or a properties file. Properties can be set in the following three ways:

- Use the profile or system default properties file:

<profile_home>/properties/wsadmin.properties

or

<was_home>/properties/wsadmin.properties

- Use a customized properties file placed in the location pointed to by the WSADMIN_PROPERTIES environment variable. You can copy the default properties file to this location and modify it.

- Specify the -p argument to the wsadmin command.

The properties to note are listed in Table 5-1.

Table 5-1

Property Value
com.ibm.ws.scripting.connectionType SOAP, RMI or NONE
com.ibm.scripting.port TCP port of target system
com.ibm.scripting.host Host name of target system
com.ibm.ws.scripting.defaultLang Jython or Jacl
com.ibm.ws.scripting.echoparams Determines whether parameters or arguments are output to STDOUT or to the wsadmin trace file
com.ibm.ws.scripting.traceFile File for trace information
com.ibm.ws.scripting.validationOutput Location of validation reports
com.ibm.ws.scripting.traceString =com.ibm.*=all=enabled
com.ibm.ws.scripting.appendTrace Appends to the end of the existing log file
com.ibm.ws.scripting.profiles List of profiles to be run before running user commands, scripts, or an interactive shell
com.ibm.ws.scripting.emitWarningForCustomSecurityPolicy Controls whether message WASX7207W is emitted when custom permissions are found
com.ibm.ws.scripting.tempdir Store temporary files when installing applications
com.ibm.ws.scripting.validationLevel Level of validation to use when configuration changes are made from the scripting interface
com.ibm.ws.scripting.crossDocumentValidationEnabled Determines whether the validation mechanism examines other documents when changes are made to one document
com.ibm.ws.scripting.classpath List of paths to search for classes and resources

wsadmin properties

Some of the listed properties in the wsadmin.properties file are commented out by default. An example is com.ibm.ws.scripting.traceString. If you want to trace wsadmin execution, remove the comment sign # from the properties file.

Similarly, some of the properties contain values. For example, com.ibm.ws.scripting.connectionType has a default value of SOAP. This means that when a scripting process is invoked, a SOAP connector is used to communicate with the server.

The wsadmin command can operate in either connected or local mode. In connected mode, all operations are performed by method invocations on running JMX MBeans. In local mode, the appserver (MBeans server) is not started and the wsadmin objects are limited to configuring the server by means of directly manipulating XML configuration documents. When operating in local mode, it is very important to specify the correct profile for performing the administration tasks or starting the tool from the correct profile directory. Remember that each appserver instance is configured from a set of XML documents that is stored in separate directories for every server instance (the appserver profile).

When performing configuration changes in local mode in a distributed server environment, care should be take to make configuration changes at the deployment manager level. Changes made directly to the node configuration will be lost at server startup or at configuration replication.

In addition to the properties file and configuration profile, you should also take note of the script profile file. This is not to be confused with the server configuration profile. A script profile is a script that is invoked before the main script or before invoking wsadmin in interactive mode. The purpose of the script profile is to customize the environment on which scripts run. For example, a script profile can be set for Java Command Language (Jacl) scripting language that makes Jacl-specific variables or procedures available to the interactive session or main script.


Redbooks ibm.com/redbooks

Next