Oracle9i Application Developer's Guide - Advanced Queuing
Release 1 (9.0.1)

Part Number A88890-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

JMS Operational Interface: Basic Operations (Point-to-Point), 20 of 24


Browsing Messages Using a Queue Browser

Figure 14-17 Use Case Diagram: Browsing Messages Using a Queue Browser


Text description of adq14jpp10.gif follows
Text description of the illustration adq14jpp10.gif


To refer to the table of all basic operations having to do with the Operational Interface see:

  • "Use Case Model: Operational Interface -- Basic Operations"

 

Purpose

Browse messages using a queue browser.

Usage Notes

Use methods in java.util.Enumeration to go through the list of messages.

Syntax

Example

/* Create a browser for queues with a specified selector */
public void browse_rush_orders(QueueSession jms_session)
{
   QueueBrowser    browser;
   Queue           queue;
   ObjectMessage   obj_message
   BolOrder        new_order;
   Enumeration     messages;

   /* get a handle to the new_orders queue */
   queue = ((AQjmsSession) jms_session).getQueue("OE", "OE_neworders_que");

   /* create a Browser to look at RUSH orders */
   browser = jms_session.createBrowser(queue, "JMSCorrelationID = 'RUSH'");

   /* Browse through the messages */
   for (messages = browser.elements() ; message.hasMoreElements() ;) 
   {
     obj_message = (ObjectMessage)message.nextElement();
   }
} 

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback