Running external administrative scripts

Scripting is a non-graphical alternative that you can use to configure and manage the WebSphere® Application Server. You can now run administrative scripts from within the development environment, without having to switch to WebSphere's command-line management tools, wsadmin.

The WebSphere Application Server uses the Bean Scripting Framework (BSF), which supports a variety of scripting languages to configure and control your WebSphere Application Server installation. The following table summarizes which scripting languages are supported with which version of WebSphere Application Server:

Table 1. The supported scripting languages on WebSphere Application Server
Application Server Scripting Language
Jacl Jython
WebSphere Application Server v6.0 Supported Supported
WebSphere Application Server v5.1 Supported Supported
WebSphere Application Server v5.0 Supported Not supported
There are five wsadmin objects available when you use scripts:
  • AdminControl: Use to run operational commands
  • AdminConfig: Use to run configurational commands to create or modify WebSphere Application Server configurational elements.
  • AdminApp: Use to administer applications.
  • AdminTask: Use to run administrative commands.
  • Help: Use to obtain general help.
The scripts use these objects to communicate with message driven beans (MBeans) that run in WebSphere Application Server processes. MBeans are Java™ objects that represent Java Management Extensions (JMX) resources. JMX is an optional package addition to Java 2 Platform Standard Edition (J2SE). JMX is a technology that provides a simple and standard way to manage Java objects.
Running administrative scripts against a secured server is supported on WebSphere Application Server v6.0, but not on v5.x. To run administrative scripts against a secured WebSphere Application Server v6.0, you need to update your development environment to at least one of the following product fix-pack levels:
  • WebSphere Application Server Toolkit v6.0.1
  • IBM® Rational® Software Development Platform v6.0.0.1 and higher

Prerequisites

  • Install WebSphere Application Server, with the Scripted Administration feature installed.
    Tip: You can select to install the Scripted Administration feature, when you select to custom install the WebSphere Application Server. If you are using a WebSphere test environment, the Scripted Administration feature is installed by default.
  • Create a script file to configure or manage your WebSphere Application Server.
  • Start the WebSphere Application Server. If the WebSphere Application Server v6.0 is secured, before starting the server you need to communicate the authentication settings from your development environment to the run-time server, for more details see Specifying authentication settings to a secured WebSphere Application Server v6.0.
To run external administrative scripts within the workbench:
  1. In the Servers view, right-click on the server and select Run external admin script. The Jacl or Jython admin script file to run dialog opens.
  2. Locate the script file, on your file system, that you want to run and then click Open.
  3. After you click Open, the script runs. The console view displays any system outputs or errors from running the script.
  4. Caution: If you run a script file against a secured server, your password is displayed in plain text in the Run wizard:
    1. In the menu bar, select Run > Run .... The Run wizard opens.
    2. Under Configurations list, expand Java Application folder and select Run external admin script.
    3. On the right pane, select the (x) = Arguments tab.
    4. Under Program arguments section, you can see your password is displayed in plain text.
For more information on administrative scripting, see the following references:
Terms of use | Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.