Oracle8i Application Developer's Guide - Advanced Queuing
Release 2 (8.1.6)

Part Number A76938-01

Library

Product

Contents

Index

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

JMS Operational Interface: Basic Operations (Shared Interfaces), 31 of 58


Specify the Navigation Mode for Receiving Messages

Figure 16-30 Use Case Diagram: Specify the Navigation Mode for Receiving Messages



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

Specify the Navigation Mode for Receiving Messages

Usage Notes

Not applicable.

Syntax

See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:

Examples

See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment.

TopicConnectionFactory    tc_fact   = null;
TopicConnection           t_conn    = null;
TopicSession              t_sess    = null;
TopicSession              jms_sess;
Topic                     shipped_orders;
int                       myport = 5521;

/* create connection and session */

tc_fact = AQjmsFactory.getTopicConnectionFactory("MYHOSTNAME",
                                                  "MYSID", myport, "oci8");
t_conn = tc_fact.createTopicConnection("jmstopic", "jmstopic");
jms_sess = t_conn.createTopicSession(true, Session.CLIENT_ACKNOWLEDGE);

shipped_orders = ((AQjmsSession )jms_sess).getTopic("WS",
"Shipped_Orders_Topic");
/* create a subscriber, specifying the correct CustomDatumFactory  and
selector */

subscriber1 = jms_sess.createDurableSubscriber(shipped_orders,
'WesternShipping',
                " priority > 1 and tab.user_data.region like 'WESTERN %'",
                  false,AQjmsAgent.getFactory());

subscriber1.setNavigationMode(AQjmsConstants.NAVIGATION_FIRST_MESSAGE);

/* get message for the subscriber, returning immediately if there was no
message */
Message = subscriber.receive();

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

All Rights Reserved.

Library

Product

Contents

Index