Photo of the cover of WebSphere Application Server Administration Using Jython

Official companion web site

A Sample Library of Python Scripts for WebSphere Application Server Administration

Most recently modified on 2010-05-29
Available from
Back to home page Back to table of contents page
Installing a Library of Jython Scripts

In this article, we will describe the contents of our sample script library. Unpack the zip file that contains the library to a location of your choice. You will find a WASscriptingImports.py file and two subdirectories: server and misc. The instructions for editing your wsadmin.properties file and our library's WASscriptingImports.py file are found on this page.

Our sample script library consists of several python files. Each file becomes a separate module when we import it.

File Name Description of Contents
serverFunctions.py

Various administrative functions involving servers. Contains methods to:

  • create and delete application servers
  • create and delete clusters
  • add member servers to clusters
docFunctions.py

Create documentation for the various WebSphere Application Server script objects. Each AdminTask command is documented in XML format. The command description, the list of parameters, and the list of steps for each command all appear in one place. Display the output on your browser.

parsing.py

The functions in this file parse either an Object Name or a configuration ID. Both functions look for values that match a given key. What keys exist depends on the Object Name or a Configuration ID in question. The burden is on the caller to know what keys exist.

If you look at a configuration ID, you will see keys like "cells", "nodes", "servers", etc. If you remove the trailing 's', you will have the name of the key.

If you look at an object name, you will see a collection of "key=value" pairs separated by commas..

chains.py

Methods to find various kinds of WAS transport chains. Useful if you have to secure any service integration buses.

disassemble.py

Methods in this file disassemble Java executables

Arthur Kevin McGrath

Bio:

The author is an engineer with the consulting firm, Contract Engineers. He has consulted and lectured extensively since 1987 about the infrastructure that makes electronic commerce possible. His publications include Leading Practices for WebSphere Dynamic Process Edition V6.2 (SG24-7776-00) and Websphere Application Server Administration Using Jython (ISBN 0137009526), the definitive book on WAS scripting.

Photo of the author
Click here to schedule a speaker at your location Click here to inquire about consulting for your company Click here to inquire about training for your company