one can puase or start the queue deployed in weblogic by using the admin console.But sometimes we may require to do this programmatically.Weblogic provides the API JMSDestinationRuntimeMBean for doing this.
Destination queue = (Destination) context.lookup("queue JNDI name"); weblogic.management.runtime.JMSDestinationRuntimeMBean destBean = weblogic.jms.extensions.JMSRuntimeHelper.getJMSDestinationRuntimeMBean( context, queue); destBean.pauseConsumption(); //Will pause the queue destBean.resumeConsumption(); //Will start the paused queue again |
can you send me the complete script to my mail ID samba331@gmail.com.
ReplyDeleteI`m getting the following exception:
ReplyDeletejavax.jms.JMSException: Unknown foreign destination end.
Are you putting some parameters into context variable?
Hi Please send me the whole script. Thanks in advance.
ReplyDeletejamwalpankaj@gmail.com