Skip to content
/ WDR Public
forked from WDR/WDR

Jython framework aiming for simplified WebSphere Application Server scripting

License

Notifications You must be signed in to change notification settings

philowest/WDR

 
 

Repository files navigation

WDR

Join the chat at https://gitter.im/WDR/WDR

Jython library which aims to greatly simplify WebSphere scripting.

Features

  • makes wsadmin scripts more "Pythonic" and readable and maintainable in result
  • allows interoperability with "legacy" Jython scripts including mixing of classic wsadmin and WDR code
  • works with currently supported WSAS versions (6.1 and later)
  • Open Source, Apache License, Version 2.0

Some highlights

Listing nodes and servers available in configuration

for node in listConfigObjects('Node'):
    print node.name
    for server in node.listConfigObjects('Server'):
        print " "   server.name

The same code in wsadmin would look like as follows:

for node in AdminConfig.list('Node').splitlines():
    print AdminConfig.showAttribute(node, 'name')
    for server in AdminConfig.list('Server', node).splitlines():
        print ' '   AdminConfig.showAttribute(server, 'name')

Modifying configuration objects

jvm = getid1('/Server:dmgr/JavaProcessDef:/JavaVirtualMachine:/')
jvm.initialHeapSize = 64
jvm.maximumHeapSize = 512

Invoking MBean operations

dmgr = getMBean1(type='Server', process='dmgr')
dmgr.restart()

Getting started

  • Clone the latest repository with git clone https://github.com/WDR/WDR.git
  • run wsadmin with
  • -profile $WDR_HOME/profile.py
  • -javaoption "-Dpython.path=$WDR_HOME/lib/common:$WDR_HOME/lib/legacy"

Visit WDR home page for more...

For more documentation and examples check WDR home page.

About

Jython framework aiming for simplified WebSphere Application Server scripting

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.9%
  • Batchfile 1.6%
  • Shell 1.5%