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 (Publish-Subscribe), 37 of 37


Browsing Messages Using a Topic Browser

Figure 15-35 Use Case Diagram: Browse Messages Using a Topic Browser


Text description of adq81425.gif follows
Text description of the illustration adq81425.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 topic browser.

Usage Notes

Use methods in java.util.Enumeration to go through the list of messages. Use the method purgeSeen in TopicBrowser to purge messages that have been seen during the current browse.

Syntax

Example

/* Create a browser for topics with a specified selector */
public void browse_rush_orders(TopicSession jms_session)
{
    TopicBrowser    browser;
    Topic           topic;
    ObjectMessage   obj_message
    BolOrder        new_order;
    Enumeration     messages;

    /* get a handle to the new_orders topic */
    topic = ((AQjmsSession) jms_session).getTopic("OE", "OE_bookedorders_
topic");

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

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

    /* Purge messages seen during this browse */
    browser.purgeSeen();
}


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