Chapter 8. Administration with scripting 321
8.2 Launching wsadmin
The wsadmin command file resides in the bin directory of every profile. Start wsadmin from a
command prompt with the following command (as appropriate):
UNIX: profile_root/bin/wsadmin.sh
Windows: profile_root\bin\wsadmin
Note that the wsadmin command also exists in the bin directory of the install_root directory.
If you start wsadmin from this location, you must be careful to specify the profile to work within
the command. If you do not specify the profile, the default profile is chosen.
Example 8-1 shows how to start wsadmin. In this example, the wsadmin command is used to
connect to the job manager. It is issued from the bin directory of the job manager profile. The
profile does not need to be specified. The -lang argument indicates Jython is used (Jacl is the
default).
Example 8-1 Flexible management: The wsadmin command line
C:\WebSphereV8.5\AppServer\profiles\jmgr40\bin>wsadmin -lang jython
WASX7209I: Connected to process "jobmgr" on node jmgr40node using SOAP connector
; The type of process is: JobManager
WASX7031I: For help, enter: "print Help.help()"
wsadmin>
To get syntax-related help, use wsadmin -? or -help (see Example 8-2).
Example 8-2 The wsadmin syntax
wsadmin
[ -h(elp) ]
[ -? ]
[ -c <command> ]
[ -p <properties_file_name>]
[ -profile <profile_script_name>]
[ -f <script_file_name>]
[ -javaoption java_option]
[ -lang language]
[ -wsadmin_classpath class path]
[ -profileName profile]
[ -conntype
SOAP
[-host host_name]
[-port port_number]
[-user userid]
[-password password] |
RMI
[-host host_name]
[-port port_number]
[-user userid]
[-password password] |
JSR160RMI
[-host host_name]
[-port port_number]
[-user userid]
[-password password] |
IPC
322 WebSphere Application Server V8.5 Administration and Configuration Guide for the Full Profile
[-ipchost host_name]
[-port port_number]
[-user userid]
[-password password] |
NONE
]
[ -jobid <jobid_string>]
[ -tracefile <trace_file>]
[ -appendtrace <true/false>]
[ script parameters ]
8.2.1 Scripting environment properties file
You can set the properties that determine the scripting environment for wsadmin using either
the command line or a properties file. Modifying the properties file can be useful when you
want to change a default setting, for example, changing the language from Jacl to Jython.
You can set properties in the following locations:
The installation default properties file for the profile, which is located in the following
directory:
profile_root/properties/wsadmin.properties
A user default properties file, which is located in the Java user.home property.
A customized properties file placed in the location that is pointed to by the
WSADMIN_PROPERTIES environment variable.
A customized properties file, which is pointed to using the -p argument to the wsadmin
command.
When wsadmin is started, properties are loaded from these files in the order listed in
Table 8-1. The properties file that is loaded last overrides any property files loaded earlier.
Table 8-1 The wsadmin properties
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.emitWarningForCustomS
ecurityPolicy
Controls whether message WASX7207W is
emitted when custom permissions are found

Get WebSphere Application Server V8.5 Administration and Configuration Guide for the Full Profile now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.