Oracle8i Application Developer's Guide - Advanced Queuing Release 2 (8.1.6) Part Number A76938-01 |
|
JMS Operational Interface: Basic Operations (Publish-Subscribe), 16 of 29
Create a durable subscriber for a jms topic without selector.
The subscriber name and JMS topic need to be specified to create a durable subscriber. An unsubscribe call is needed to end the subscription to the topic.
Java (JDBC): Oracle8i Supplied Java Packages Reference,oracle.jms, AQjmsSession.CreateDurableSubscriber
TopicConnectionFactory tc_fact = null; TopicConnection t_conn = null; TopicSession jms_sess; TopicSubscriber subscriber1; 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"); /* create a durable subscriber on the shipped_orders topic*/ subscriber1 = jms_sess.createDurableSubscriber(shipped_orders, 'WesternShipping');
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|