Oracle9i Application Developer's Guide - Advanced Queuing Release 1 (9.0.1) Part Number A88890-02 |
|
JMS Operational Interface: Basic Operations (Point-to-Point), 15 of 24
Create a queue browser for queues with text, stream, objects, bytes or map messages.
To retrieve messages that match certain criteria, the selector for the QueueBrowser can be any expression that has a combination of one or more of the following:
JMSMessageID = 'ID:23452345
' to retrieve messages that have a specified message ID
JMSPriority < 3 AND JMSCorrelationID = 'Fiction'
color IN ('RED', BLUE', 'GREEN') AND price < 30000
All message IDs must be prefixed with "ID:"
Use methods in java.util.Enumeration to go through list of messages.
/* Create a browser without a selector */ QueueSession jms_session; QueueBrowser browser; Queue queue; browser = jms_session.createBrowser(queue);
/* Create a browser for queues with a specified selector */ QueueSession jms_session; QueueBrowser browser; Queue queue; /* create a Browser to look at messages with correlationID = RUSH */ browser = jms_session.createBrowser(queue, "JMSCorrelationID = 'RUSH'");
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|