Why and when to perform this task
The purpose of this section is to provide guidance for migrating from WebSphere Application Server V4.0 wscp scripts to wsadmin in V5.x.
The wscp tool was a part of the WebSphere
Application Server V4.0 administration repository support. The repository
no longer exists and the tools that manipulate it are no longer needed. You
can use the V5.x 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 V5.x
scripts that perform actions similar to those performed by V4.0 wscp. Automatic
conversion of scripts between the two releases is difficult.
The wsadmin scripting client uses the Bean Scripting Framework (BSF), and is based on Java Management Extensions (JMX).
In V4.0, wscp commands are used for both configuration queries or updates, and operational commands. In V5.x, a distinction is made between configurational and operational commands.
Steps for this task
V4.0 wscp command | V5.x 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 |
wscp 4.0 | wsadmin 5.x | wsadmin 5.x | wsadmin 5.x |
action | Object and command | Mbean, if any | Operation, if any |
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 | ||
disable security | securityoff command |
Using Jacl:
$AdminConfig save