Wednesday, December 17, 2008

Easy Syntax with WLST

WLST is a powerful scripting solution for managing and administering WebLogic Server and resources deployed on them. WLST is built on the Java implementation of the scripting language Python called as Jython. All the commands in WLST are implemented as Jython functions and they require a set of parentheses for passing any arguments. Even any commands that do not require any arguments are supposed to be suffixed with parentheses. For example the command "ls" is used to list all the child MBeans and/or attributes of the current MBean you are at.

ls() - lists all the child MBeans and attributes
ls('a') - lists all the attribute names and values only
ls('c') - lists all the child MBeans only

So even if you want to invoke "ls" with no arugments you must use "ls()". This might not be an issue when you are building scripts that you might want to run many times. But while connected to a server and working with WLST in interactive mode, it might get a little frustated to type the parentheses everytime you want to run some simple commands with no arguments. To ease this pain there is a hidden option in WLST which can be used to ease the syntax for WLST commands - easeSyntax().

You can supply the "easeSyntax()" command to ease the syntax but this is not recommended for script mode and especially when using loop constructs. You can also use the regular Jython syntax with parentheses even after you enabled the easy syntax. To turn off the easy syntax mode simply issue the command again "easeSyntax".

Bye Bye parentheses!


  1. easeSyntax() doesn't work with all commands, try with with edit() or serverConfig().

    also how about using it for 2 arguments? did anyone figure out how to do a
    set ListenPort 9999
    instead of set('ListenPort','9999')?

    IMHO it would be nice to have some TAB-completion of commands, or CTRL-Space for the Eclipse junkies.
    Even DOS can do this now. Come on it is Y2009 :-)

    don't get me wrong. I am big fan of WLST but there is much space for improvement also.

    maybe a python plugin configured into Eclipse/Workhop was a good start for Oracle to improve this.

    best wishes,


  2. Take a look at JyDT ( is a plug-in to do Jython from Eclipse. You should be able to do WLST from this as well. I shall write a separate blog entry with more detail soon.

  3. have you been able to get JyDT to work with Workshop 10gR3? The plugin worked fine with Workshop 9.x for couple of years, but I get an error trying to install it in Workshop 10gR3: "WebLogic Portal (10.3.0) requires feature "com.m7.nitrox (1.0.20)", or compatible." I would be interested to know if you have different results. Thanks.

  4. recipe for old fashioned tomato pie virtual kitchen designer [url=]fashion games for teens[/url] preteen fashion galleries snow shoes [url=]shoes boots western childrens[/url]

  5. flu jab die ill rely scientist year britain drugs kills [url=]generic keflex[/url] harvey keats westchester square medical center
    normal fasting rate for blood sugar [url=]menopause gum[/url] fatigue restless leg syndrome [url= ]health and safety quizzes with answers [/url] dui blood test california
    diagnosis medical symptoms you have [url=]cytotec[/url] items for the penis
    australia pharmacy online [url=]cleocin gel[/url] smoking room distingished [url= ]multiple orgasms with viagra [/url] mass health dma

  6. pics of the urinary system [url=]cardiovascolari[/url] black men and vitamin d
    dental practice management [url=]terramycin[/url] viagra pharmacy stop [url= ]effects of a aspirin overdose [/url] mn dental care richfield
    low blood sugar rapid heart rate [url=]gastrointestinal[/url] pregnancy diet nutrition
    short broken heart poems [url=]Pharmacy bestsellers[/url] veronnika zemanova breast implants [url= ]removing fluid congestive heart failure [/url] abilify a treatment option for bipolar 1 disorder