Interview Questions

How do I manage a queue to view and delete specific messages?

BEA WebLogic Questions and Answers


(Continued from previous question...)

How do I manage a queue to view and delete specific messages?

Write a program that uses a QueueBrowser. Then delete specific messages by using a selector with the message identifier as in the following example:

String selector = "JMSMessageID = '" + message.getMessageID() + "'";
Keep in mind that the queue browser is a not a "live" view of the queue. It is a snap-shot.

(Continued on next question...)

Other Interview Questions