09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

See Also:<br />

Publishing a Message Using a Topic Publisher—with Minimal Specification<br />

Table 15–1 for a list of publish-subscribe basic operations in the<br />

<br />

JMS operational interface<br />

"Interface - javax.jms.TopicPublisher" on page B-38<br />

"Publishing a Message Using a Topic Publisher—Specifying<br />

<br />

Correlation and Delay" on page 15-15<br />

"Publishing a Message Using a Topic Publisher—Specifying<br />

<br />

Priority and Time-To-Live" on page 15-18<br />

"Publishing a Message Using a Topic Publisher—Specifying a<br />

<br />

Recipient List Overriding Topic Subscribers" on page 15-21<br />

Purpose<br />

Publish a message with minimal specification.<br />

Usage Notes<br />

If the Topic Publisher has been created with a default topic, then the topic<br />

parameter may not be specified in the publish call. If a topic is specified in the send<br />

operation, then that value will override the default in the TopicPublisher. If the<br />

TopicPublisher has been created without a default topic, then the topic must be<br />

specified with the publish. The TopicPublisher uses the default values for message<br />

priority (1) and timeToLive (infinite).<br />

Syntax<br />

Java (JDBC): <strong>Oracle</strong>9i Supplied Java Packages Reference oracle.jms,<br />

AQjmsTopicPublisher.publish<br />

Example<br />

Example 1 - publish specifying topic<br />

TopicConnectionFactory tc_fact = null;<br />

TopicConnection t_conn = null;<br />

TopicSession jms_sess;<br />

TopicPublisher publisher1;<br />

Topic shipped_orders;<br />

int myport = 5521;<br />

/* create connection and session */<br />

tc_fact = AQjmsFactory.getTopicConnectionFactory('MYHOSTNAME',<br />

JMS Operational Interface: Basic Operations (Publish-Subscribe) 15-13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!