Migrating from Systems Management Scripting API (SMAPI) V4 to wsadmin V5

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

  1. Identify the SMAPI command type in the script, configuration or operation.
    • Configuration command types use the CB390CFG command. You can list, create, delete, and change various configuration objects like the conversation, system, servers, JavaTM platform Enterprise Edition (J2EE) resources, and so on with this command.
    • Operation command types use the CB390CMD command. You can start, stop, cancel, restart. You can also list defined server instances.
  2. Find the corresponding V5 objects that the V4 configuration command can be performed on. In V5, the AdminConfig management object uses the create, list, modify, remove, show, and showAttribute commands on configuration objects. V5 configuration objects include Server, ModuleDeployment, Node, ServerCluster, URL, VirtualHost, and URLProvider in addition to the ones listed in the following table.
    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


  3. Determine the V5 attribute names by using the online help commands of the AdminConfig object. Examples include attributes, defaults, parents, required, or types.
  4. Convert application installation commands.
    For application installation, use the AdminApp object installInteractive command to complete a successful installation. Then locate message WASX7278I in the wsadmin.traceout log file. Use the data in the message to construct an installation command for your source.
  5. Convert operational commands. The following illustrates an example:
    V4 SMAPI action V5 wsadmin ojbect and command
    CB390CMD("-action 'start' -servername 'BBOASR1' -serverinstancename '*' -output 'FCT33'") $AdminControl startServer server1


  6. Save configuration changes.
    In V5, configuration changes are made to a temporary workspace. These changes are not committed to the WebSphere Application Server configuration until you invoke the save command on the AdminConfig object. If your script makes configuration changes, for example, creates, removes, or changes objects, or installs or uninstalls applications, invoke the following command to commit the change:
    $AdminConfig save

Related reference
Example: Migrating - Starting an application server
Example: Migrating - Installing an application
Example: Migrating - Uninstalling an application
Example: Migrating - Defining a JavaTM 2 Enterprise Edition resource
Example: Migrating - Stopping an application server
Wsadmin tool



Searchable topic ID:   txmlmigratezos
Last updated: Jun 21, 2007 9:56:50 PM CDT    WebSphere Application Server for z/OS, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/txml_migrate_zos.html

Library | Support | Terms of Use | Feedback