Migrate from wscp to wsadmin

Note: This topic does not describe how to migrate your entire configuration to Version 5. For more information about migrating your configuration, see Migration for migration instructions and tools.

The wscp tool was a part of the administration repository support in WebSphere Application Server Version 4.0 and Version 3.5 Advanced Edition. Use the Version 5 scripting client program, wsadmin, to do the same kinds of things wscp did, and more. You can use the JACL scripting language for scripts, but the elements specific to wsadmin are different from those available in wscp. This article shows how to create WebSphere Application Server Version 5 scripts that perform actions similar to those performed by wscp. Automatic conversion of scripts between the two releases is difficult.

In Version 4.0, wscp commands are used for both configuration queries or updates and operational commands. In version 5, a distinction is made between configurational and operational commands.

Configuration commands for wscp

Other commands exist to provide help for configuration commands. These commands include attributes, containment, and help.

Operation commands for wscp

To convert wscp commands to wsadmin commands, follow these steps:

  1. Find the corresponding configuration wsadmin Version 5 object type for each configuration command. Use the AdminConfig create, list, modify, remove, show, and showAttribute commands to perform the same type of operations in Version 5 that you performed in Version 4.0. Use this table to determine the corresponding types:

    Version 4.0 wscp command Version 5 wsadmin configuration type
    ApplicationServer Server
    Context Not applicable
    DataSource WAS40DataSource, DataSource
    Domain Not applicable
    EnterpriseApp ApplicationDeployment
    GenericServer Server
    J2CConnectionFactory J2CConnectionFactory
    J2CResourceAdapter J2CResourceAdapter
    JDBCDriver JDBCProvider
    JMSConnectionFactory JMSConnectionFactory
    JMSDestination JMSDestination
    JMSProvider JMSProvider
    MailSession MailSession
    Module ModuleDeployment
    Node Node
    ServerGroup ServerCluster
    URL URL
    URLProvider URLProvider
    VirtualHost VirtualHost

  2. Use the online help command of the AdminConfig object to determine the version 5 attribute names. For example: attributes, defaults, parents, required, or types. These examples illustrate the use of this command:

    • This example lists the attributes available for the Server object type:
      $AdminConfig attributes Server
    • This example lists the types you can configure:
      $AdminConfig types
    • This example lists the objects which contain the DataSource object type:
      $AdminConfig parents DataSource

  3. Convert application installation commands:

    1. Run the installInteractive command on the AdminApp object from an interactive wsadmin session.
    2. Locate message WASX7278I in the wsadmin.traceout log file and use the data in the message to construct an installation command for your application.

  4. Convert operational commands. Use this table to determine how to convert operational commands:

    wscp 4.0 action wsadmin 5.0 object and command wsadmin 5.0 MBean wsadmin 5.0 Operation
    server start AdminControl startServer    
    server stop AdminControl stopServer    
    servergroup start AdminControl invoke Cluster start
    servergroup stop AdminControl invoke Cluster stop
    application start AdminControl invoke ApplicationManager startApplication
    application stop AdminControl invoke ApplicationManager stopApplication
    node stop AdminControl invoke nodeagent stopNode
    check run-time attribute AdminControl getAttribute mbean attribute
    check run-time attributes AdminControl getAttributes mbean list of attributes
    regenPluginCfg AdminControl invoke PluginCfgGenerator generate
    testConnection AdminControl testConnection    
    enable security securityon command in securityProcs.jacl    
    disable security securityoff command in securityProcs.jacl    

These help topics provide examples of migrating wscp commands to wsadmin commands: