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

A76938-01

Library

Product

Contents

Index

Prev Up Next

JMS Operational Interface: Basic Operations (Publish-Subscribe), 14 of 29


Publish Messages Specifying a Recipient List Overriding Topic Subscribers

Figure 15-12 Use Case Diagram: Publish-Subscribe - Publish A Messages Specifying a Recipient List Overriding Topic Subscribers



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

Publish a messages specifying a recipient list overriding topic subscribers.

Usage Notes

The subscription list of the topic can be overridden by specifying the recipient list with the publish call.

Syntax

Example

 Example 1 - publish specifying priority, timeToLive

TopicConnectionFactory    tc_fact   = null;
TopicConnection           t_conn    = null;
TopicSession              jms_sess;
TopicPublisher            publisher1;
Topic                     shipped_orders;
int                       myport = 5521;
AQjmsAgent[]              recipList;    
  
/* 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("OE", "Shipped_Orders_
Topic");
publisher1 = jms_sess.createPublisher(shipped_orders);

/* create text message */
TextMessage     jms_sess.createTextMessage();

/* create two receivers */
recipList = new AQjmsAgent[2];

recipList[0] = new AQjmsAgent("ES", "ES.shipped_orders_topic", 
                           AQAgent.DEFAULT_AGENT_PROTOCOL);

recipList[1] = new AQjmsAgent("WS", "WS.shipped_orders_topic", 
                           AQAgent.DEFAULT_AGENT_PROTOCOL);

/* publish  message specifying a recipient list */
publisher1.publish(text_message, recipList);


Prev Up Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index