Wednesday, December 15, 2010

WebLogic Scripting Tool Tip – relax the syntax with the easy button

This blog was originally posted on http://blogs.oracle.com/jamesbayer when I worked for Oracle.

s0105150_sc7[1] I stumbled on to this feature in WLST tonight called easeSyntax. Apparently it’s a hidden feature that one of the WebLogic support engineers blogged about that allows you to simplify the commands in the interactive mode to have fewer parentheses and quotes. For example, see how some of the commands instead of typing “ls()” I can type '”ls” or “cd(“/somepath”)” can become “cd /somepath”. It’s not going to save the world, but it will help cut down on some extra typing.

The example I was researching when stumbling into this was for how to print the runtime status of deployed application named “hello” on the “AdminServer”. See the below output.

wls:/base_domain/domainConfig> easeSyntax()

 

You have chosen to ease syntax for some WLST commands.

However, the easy syntax should be strictly used in

interactive mode. Easy syntax will not function properly in

script mode and when used in loops. You can still use the

regular jython syntax although you have opted for easy

syntax.

Use easeSyntax to turn this off.

Use help(easeSyntax) for commands that support easy syntax

wls:/base_domain/domainConfig> domainRuntime

 

wls:/base_domain/domainRuntime> ls

dr--   AppRuntimeStateRuntime

dr--   CoherenceServerLifeCycleRuntimes

dr--   ConsoleRuntime

dr--   DeployerRuntime

dr--   DeploymentManager

dr--   DomainServices

dr--   LogRuntime

dr--   MessageDrivenControlEJBRuntime

dr--   MigratableServiceCoordinatorRuntime

dr--   MigrationDataRuntimes

dr--   PolicySubjectManagerRuntime

dr--   SNMPAgentRuntime

dr--   ServerLifeCycleRuntimes

dr--   ServerRuntimes

dr--   ServerServices

dr--   ServiceMigrationDataRuntimes

 

-r--   ActivationTime                               Wed Dec 15 22:37:02 PST 2010

-r--   MessageDrivenControlEJBRuntime               null

-r--   MigrationDataRuntimes                        null

-r--   Name                                         base_domain

-rw-   Parent                                       null

-r--   ServiceMigrationDataRuntimes                 null

-r--   Type                                         DomainRuntime

 

-r-x   preDeregister                                Void :

-r-x   restartSystemResource                        Void : WebLogicMBean(weblogic.management.configuration.SystemResourceMBean)

 

wls:/base_domain/domainRuntime> cd AppRuntimeStateRuntime/AppRuntimeStateRuntime

wls:/base_domain/domainRuntime/AppRuntimeStateRuntime/AppRuntimeStateRuntime> ls

 

-r--   ApplicationIds                               java.lang.String[active-cache#1.0@1.0, coherence-web-spi#1.0.0.0@1.0.0.0, coherence#3.

-r--   Name                                         AppRuntimeStateRuntime

-r--   Type                                         AppRuntimeStateRuntime

 

-r-x   getCurrentState                              String : String(appid),String(moduleid),String(subModuleId),String(target)

-r-x   getCurrentState                              String : String(appid),String(moduleid),String(target)

-r-x   getCurrentState                              String : String(appid),String(target)

-r-x   getIntendedState                             String : String(appid)

-r-x   getIntendedState                             String : String(appid),String(target)

-r-x   getModuleIds                                 String[] : String(appid)

-r-x   getModuleTargets                             String[] : String(appid),String(moduleid)

-r-x   getModuleTargets                             String[] : String(appid),String(moduleid),String(subModuleId)

-r-x   getModuleType                                String : String(appid),String(moduleid)

-r-x   getRetireTimeMillis                          Long : String(appid)

-r-x   getRetireTimeoutSeconds                      Integer : String(appid)

-r-x   getSubmoduleIds                              String[] : String(appid),String(moduleid)

-r-x   isActiveVersion                              Boolean : String(appid)

-r-x   isAdminMode                                  Boolean : String(appid),String(java.lang.String)

-r-x   preDeregister                                Void :

 

wls:/base_domain/domainRuntime/AppRuntimeStateRuntime/AppRuntimeStateRuntime> cmo.getCurrentState('hello','AdminServer')

'STATE_ACTIVE'

wls:/base_domain/domainRuntime/AppRuntimeStateRuntime/AppRuntimeStateRuntime> cd /

wls:/base_domain/domainRuntime>


7 comments:

License Crack said...

This tip is really helped me in my WebLogic. Wifi password hacker

Unknown said...

aws training in chennai with placement| aws authorized training partner in chennai|aws solution architect training in chennai

Juliana Kho said...

http://www.registerosg777.com/

DB

http://143.95.153.135/
http://143.95.159.80/
http://www.pokeridnplay.live/
http://www.daftar-sakong.org/
http://www.judi-sakong.org/
http://www.agen-judibolaonline.com/
http://www.place88.poker/
http://www.daftarsacasino.net/
http://www.dragon688.live/

Juliana Kho said...

http://143.95.158.89/
http://www.scr888casino.net/
http://www.daftarjoker123.asia/
http://www.daftarosg777.net/
http://www.s1288apk.com/
http://www.osg777mobile.com/
http://www.sabungayam-s128.com/
http://www.daftarcemeidnplay.com/
http://www.dragon688.online/

Alex Martin said...
This comment has been removed by the author.
Alex Martin said...

7 Best Money Saving Black Friday Braun Series 9 Deals 2019

7 Best Money Saving Black Friday Braun Series 9 Deals 2019

Indhu said...

Awesome..
Hardware and Networking Training in Chennai
CCNA Training in Chennai
AWS Training in Chennai
SAP Training in Chennai
Software Testing Training in Chennai
Java Training in Chennai
QTP Training in Chennai
iOS Training in Chennai
Oracle Training in Chennai
Pearson Vue Exam Center in Chennai