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), 30 of 37


Creating a Topic Receiver for a Topic of Oracle Object Type (ADT) Messages

Figure 15-28 Use Case Diagram: Publish-Subscribe - Create a Topic Receiver for a Topic of Oracle Object Type (ADT) Messages


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

Create a topic receiver for a topic of adt messages with selector.

Usage Notes

AQ allows messages to be sent to all subscribers of a topic or to specified recipients. These receivers may or may not be subscribers of the topic. If the receiver is not a subscriber to the topic, it will receive only those messages that are explicitly addressed to it.

This method must be used order to create a TopicReceiver object for consumers that are not 'Durable Subscribers'. The CustomDatumFactory of the Oracle Object type of the queue must be specified. A message selector can also be specified. This can be null. The syntax for the message selector is the same as that of a QueueReceiver for queues with ADT messages.

Syntax

Example

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

/* 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");

receiver = ((AQjmsSession)jms_sess).createTopicReceiver(shipped_orders, 
"WesternRegion", null);
 

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