How to get Messages Pending Count from a Queue using WLST?

Posted by lmestre on Oracle Blogs See other posts from Oracle Blogs or by lmestre
Published on Wed, 30 Oct 2013 23:31:41 +0000 Indexed on 2013/10/31 4:05 UTC
Read the original article Hit count: 303

Filed under:
WLST is a scripting Language that helps to achieve similar functionality as the ones you have in WebLogic console, but in a command line fashion.

You can develop your WLST Scripts using Eclipse OEPE, read more here:
https://blogs.oracle.com/oepe/entry/new_oracle_enterprise_pack_for


Finally, here is an example to get Messages Pending Count using WLST:

 . ./setDomainEnv.sh
 java weblogic.WLST
 connect('weblogic','welcome1','t3://localhost:7001')
 domainRuntime()
 jms= getMBean ('ServerRuntimes/MyManagedServer/JMSRuntime/MyManagedServer.jms/JMSServers/MyJMSServer/Destinations/MyModule!MyQueue')
 jms.getMessagesPendingCount()



Enjoy!

WLST documentation:
http://docs.oracle.com/middleware/1212/wls/WLSTG/index.html

© Oracle Blogs or respective owner

Related posts about /Oracle