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
- create
- list
- modify
- remove
- show
- showall
- install
- uninstall
- all SecurityConfig commands
- all SecurityRoleAssignment commands
- clone
- removeClone
Other commands exist to provide help for configuration commands. These commands include attributes, containment, and help.
Operation commands for wscp
- start
- stop
- show (for runtime attributes)
- testConnection
- all DrAdmin commands
- regenPluginCfg
To convert wscp commands to wsadmin commands, follow these steps:
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 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
Convert application installation commands:
- Run the installInteractive command on the AdminApp object from an interactive wsadmin session.
- Locate message WASX7278I in the wsadmin.traceout log file and use the data in the message to construct an installation command for your application.
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:
- Example: Migrating - Creating a server group
- Example: Migrating - Cloning a server group
- Example: Migrating - Starting a server group
- Example: Migrating - Stopping a server group
- Example: Migrating - Listing configured server groups
- Example: Migrating - Listing the running server groups
- Example: Migrating - Regenerating the node plug-in configuration
- Example: Migrating - Stopping a node
- Example: Migrating - Creating an application server
- Example: Migrating - Starting an application server
- Example: Migrating - Stopping an application server
- Example: Migrating - Modifying the embedded transports in an application server
- Example: Migrating - Modifying the virtual host
- Example: Migrating - Modifying and restarting an application server
- Example: Migrating - Pinging running servers for the current state
- Example: Migrating - Removing an application server
- Example: Migrating - Installing an application
- Example: Migrating - Installing a JDBC driver
- Example: Migrating - Testing the DataSource object connection
- Example: Migrating - Enabling security
- Example: Migrating - Disabling security