21-05-2013, 02:27 PM
Monty Jython's Scriiptiing Ciircus
Monty Jython's.pdf (Size: 785.17 KB / Downloads: 183)
Objectives
• Our Holy Grail: To work out some
recommended practices for using Jython
in WAS scripting
• How we're going to get there:
Quick look at what's in the WAS 6.1
Application Server Toolkit (AST)
Describe the essentials of the Jython
language
Look at some more advanced Jython
features
Pick out some key things as we proceed
Demonstrate bit and pieces of Jython
Suggest some guidelines for what scripts
should look like
It's: A short history of Jython
• Python invented by Guido van
Rossum in 1991
Operating system-independent
Object-oriented
Based on a language called
ABC
Designed to be readable
Named after the TV programme
Small language core with
extensive libraries
• Jython is a Java implementation
of Python
WAS 6.1's Jython is version 2.1
• Latest Jython is 2.2, Python 2.5
Jython programming iin the AST
• Purpose:
To greatly ease wsadmin scripting
• by simplifying the development of Jython scripts
using the Jython Editor
• by simplifying debugging Jython scripts
using the Jython Debugger
• by generating scriptlets
using the Admin Console Command Assist feature
• by converting existing Jacl scripts to Jython
using the Jacl2Jython conversion tool
Jacl2Jython utility from the AST
• Takes your Jacl scripts and converts them to Jython
Typically does 95-98% code conversion
Inserts problem warnings into the converted code
• The developer must then:
Manually verify all of the preliminary conversion
Modify some code to make it function as originally
intended
Thoroughly test the resulting script
• Does it produce Jython code in a style you would
use if writing from scratch?
Not if you want to use the OO features