Wednesday 3 October 2012

Use WLST functions inside Jython classes

Using WLST can be frustrated because all of the global functions that seemingly cannot be used inside classes. Putting functions in classes and making re-usable libraries is common practice in the current development world. Most developers would like to avoid spagetti-monsters; although some still seems to like the idea of spagetti with tomato sauce.

To use the global commands of WebLogic's WLST import the correct module:

import wlstModule as wlst

wlst.connect('weblogic','welcome1','t3s://localhost:7002')
wlst.redirect('/var/log/weblogic.log')

Thanks to: http://stackoverflow.com/questions/8252846/wlstmodule-connection-information-lost

No comments: