Sunday, February 19, 2012

List JMS queues in WebLogic with WLST

see also my previous post using Java

connect('Pierluigi', 'weblogic1', 't3://localhost:7001')
easeSyntax()

allJMSResources = cmo.getJMSSystemResources()
for jmsResource in allJMSResources:
   module = jmsResource.getName()
   print "MODULE", module
   udqs = jmsResource.getJMSResource().getUniformDistributedQueues()
   for udq in udqs:
      print "QUEUE", udq.getName(), " JNDINAME", udq.getJNDIName()


or the simplified version (only JNDI Names)

allJMSResources = cmo.getJMSSystemResources()
for jmsResource in allJMSResources:
   module = jmsResource.getName()

   udqs = jmsResource.getJMSResource().getUniformDistributedQueues()
   for udq in udqs:
      print udq.getJNDIName()




or this other version (first print all modules, then all queues with also module info)


connect('Pierluigi', 'weblogic1', 't3://localhost:7001')
easeSyntax()

allJMSResources = cmo.getJMSSystemResources()
for jmsResource in allJMSResources:
   module = jmsResource.getName()
   print "MODULE=", module

for jmsResource in allJMSResources:
   module = jmsResource.getName()
   udqs = jmsResource.getJMSResource().getUniformDistributedQueues()
   for udq in udqs:
      print "MODULE=", module, "QUEUE", udq.getName(), " JNDINAME", udq.getJNDIName()




3 comments:

Unknown said...

Hi,
How to display Lst of connection Factories in a JMS Module

Unknown said...

Hi,
How to display Lst of connection Factories in a JMS Module

Miguel Ortiz said...

Ty for this, I've extended the script to provide more information.