Node:wsadmin, Next:, Previous:Deployment, Up:Top



wsadmin

TYPICAL USAGE
wsadmin.sh
HELP
wsadmin.sh.sh -help

wsadmin.sh is a JACL shell with access to the WAS Mbeans and four WAS-specific Java extension administration objects. JACL is tcl with Java extensions... it gives you access to both Java language functionalities and to Java objects.

Can run without connecting to server, like: wsadmin.sh -conntype NONE

Limitations

I know of no way to use wsadmin to "start" an existing application that is currently not running. If you update an app that is currently running and don't save until you are finished, the app will continue to run (there is an example of this below). For an app with a new name, if you want it to run, you will have to use an Admin Console to do that (see next item about visibility), or restart WAS.

Like the Administrative Console, wsadmin does not see changes made by outside means after you enter a shell.

You can not start a (normal standalone) WAS instance with wsadmin.

WAS JACL Administration Objects

The four WAS administration objects provided are aliased to variables.

$Help

$AdminControl
Stuff about the running server
$AdminApp

$AdminConfig
For configuration of the installation

Useful WAS Administration Commands.

These are all sub-commands of the four Administration objects listed above.

$Help help

$Help <MBeanHelpCommand> MBean
Help about something about given MBean.
$Help AdminControl
lists a good description of the AdminControl object, plus a summary of the AdminControl sub-commands.
$AdminControl help <AdminCtlCommand>, etc.
for the other main commands. (Many commands have *_jmx counterparts for lower-level use)
$AdminControl getMBeanCount
(returns 55 on my server)
$AdminControl stopServer server1
(can't use startServer without a NodeAgent, even with -conntype NONE).
$AdminConfig types

$AdminConfig list JDBCProvider

$AdminConfig list Deployment

$AdminApp list

$AdminApp list Modules

$AdminApp uninstall {AppName}

$AdminApp taskInfo /tmp/webonly.ear MapWebModToVH

$AdminApp options
Lists all available options, incl. for "install"
$AdminConfig save
(Must do this to perform the uninstall) (Damned this still appears in Admin Console as a non-running App. Everything shows up right after a WAS restart.) N.b. Uninstall doesn't work for me sometimes unless I stop and start IWS after the install.
$AdminApp installInteractive src/ws/man/man.ear
(then examine wsadmin.traceout for lines containing WASX7278I) (See my script http://admc.com/blaine/howtos/nextel-util.jacl for installing or updating apps. Note that the arg to MapWebModToGH consists of triplets of the form [list $webmodule_dispname $warfile,WEB-INF/web.xml default_host]], where default_host is the default virtual host).

Comparison to Administrative Console

The following sequence is equal to Console Update + Apply

     $AdminApp uninstall {AppName}
     $AdminApp install...
     $AdminConfig save
     OR
     $AdminConfig reset
     The app continues running!
     

Deployment script

If you download http://admc.com/blaine/howtos/nextel-util.jacl and run the command

         source /app/iws/was/scripts/nextel-util.jacl
     
in wsadmin, then that jacl shell will have access to the procedures installApp and updateApp.
installApp ApplicationName path/to/file.ear nodeName serverName
Installs the given ear with the given name, using bindings specified in the deployment descriptors in the ear file. Application will start the next time WAS is started.
installApp ApplicationName path/to/file.ear nodeName serverName prefix
The same, but prefixes "prefix/" to all EJB jndi names. Application will start the next time WAS is started.
updateApp ApplicationName path/to/file.ear nodeName serverName
Same as the corresponding bInstallApp procedure. The given ear file will replace the existing application with the given name. Application will be started if the existing application was running.
updateApp ApplicationName path/to/file.ear nodeName serverName prefix
Installs the given ear with the given name, using bindings specified in Application will be started if the existing application was running.

The installApp and updateApp procedures can be used from ant. See the -deploy target in the Ant build file http://admc.com/blaine/howtos/nextelapp-build.xml.

If you have not upgraded Ant to 1.5, then see the instructions on that procedure in the installation HOWTO.