Thursday, March 4, 2010

Jython and WAS

Spent some time today working on updates to a lab related to the use of web services on WebSphere Application Server (WAS). In the past, to complete the lab, students would have to manually deploy a WAR file - which was tedious and could be a pain if they were not familiar with WAS admin tasks.

To streamline the effort, I'm investigating replacement of the manual steps with the creation of a Jython script to automate the deployment of the WAR file. I've worked with WAS in the past, but hadn't tried to do any admin scripting or worked with Jython.

I found a few resources on the topic:

  1. WAS v6.1 System Management and Configuration Redbook
  2. WebSphere Application Server V7 Administration and Configuration Guide
  3. Sample Scripts for WebSphere Application Server Versions 5 and 6 - in particular the Admin script samples in Jython
  4. WAS Info Center - in general, as well as a specific page on Command Assistance
  5. IBM Techdocs White Paper: Using Jython Scripting Language with WSADMIN

Probably not that surprising, didn't find one resource that gave me the answer I wanted when I wanted it. Took a bit of digging through these resources. However - if I was starting again (or helping someone else to do this) - I'd suggest taking a look at the Techdocs White Paper, then look at the Command Assistance page at the info center. The White Paper provides a nice overview of Jython and using it to administer WAS. Then, use the Command Assistance to build the commands that you want.

The Command Assistance works inside of the WAS Admin Console - essentially, whenever you perform a task manually, you can ask to see the script that is used to complete the task. So you can perform the set of tasks that would go into your script - capturing each of the Jython statements needed, and then save them to a .py file.


No comments:

Post a Comment