Why and when to perform this task
The purpose of this section is to provide guidance for migrating from WebSphere Application Server V4 Systems Management Scripting Application Programming Interface (SMAPI) to wsadmin in V5.
The SMAPI feature of WebSphere Application Server V4 provides the same functionality as the graphical user interface to Systems Management (systems management enhanced user interface). The only scripting language supported by the SMAPI is REXX. The SMAPI provides predefined REXX functions that allow the user to perform administration functions (CB390FCG) and operation functions (CB390CMD). There are also functions to generate input (XMLGEN) and parse the output (XMLPARSE, XMLFIND, and XMLEXTRACT) from the administration and operations applications.
The wsadmin client scripting tool in WebSphere Application Server V5 replaces the SMAPI of WebSphere Application Server V4. Version 5 distinguishes between functions that modify or query the Systems Management configuration from functions that control runtime operational commands. The wsadmin scripting client uses the Bean Scripting Framework (BSF) and is based on JavaTM Management Extensions (JMX). JavaTM Command Language (JACL) is the supported scripting language. The wsadmin tool provides the ability to run scripting commands interactively from a wsadmin shell, from the command line, or from a script. The wsadmin tool operates on configurations and running objects through the following set of management objects: AdminConfig for configuration commands, AdminControl for operational commands, AdminApp for application management commands, and Help. Each object has commands that you use to perform administrative tasks. The wsadmin tool requires that you specify a scripting object, a command, and command arguments.
This article shows how to create WebSphere Application Server V5 scripts that perform actions similar to those performed by V4 SMAPI.
Steps for this task
V4 SMAPI configuration object | V5 wsadmin configuration type |
Conversation | Not applicable |
System | Not applicable |
Sysplex | Not applicable |
Server | Not applicable |
J2EE server | ServerGroup |
J2EE Application | use AdminApp object |
Server Instance | Server |
Container | Not applicable |
LRM | Not applicable |
LRMI | Not applicable |
Container/LRM associations | Not applicable |
Application Family | Not applicable |
J2EE resources/J2EE resource Instances | J2CConnectionFactory/J2CResourceAdapter/JMSConnectionFactory/JMSDestination/JMSProvider/MailSession/WAS40DataSource |
V4 SMAPI action | V5 wsadmin ojbect and command |
CB390CMD("-action 'start' -servername 'BBOASR1' -serverinstancename '*' -output 'FCT33'") | $AdminControl startServer server1 |
$AdminConfig save