Questo sito utilizza i cookie per migliorare l'esperienza di navigazione. Continuando la navigazione acconsenti all'utilizzo dei cookie.

WLST - delete JMS messages

If you need to purge all messages from a JMS Queue, from command line  this is the WLST code that do the stuff for you : the only thing you have to do is find the path to the jms destination in the serverruntime tree :-)


ulrm1='t3://managedListenAddress:7011'
def conn(admurl):
   usr='weblogic'
   pwd='*******'
   try:
      print 'usr='+usr
      print 'pwd='+pwd
      print 'ulrm1'+ulrm1
      connect(usr, pwd, url=admurl)
   except ConnectionException,e:
      print 'Unable to connect to server...'
      exit()
conn(ulrm1)
serverRuntime()
cd('/JMSRuntime/<server>.jms/JMSServers/JMSServer1/Destinations/<QueueSetName>!<JMSServerName>@<QueueName>')
cmo.deleteMessages('')
disconnect()





Share

Aggiungi commento


Codice di sicurezza
Aggiorna