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.

Using <strong>Oracle</strong> Java Message Service to Access AQ<br />

Managing the Java AQ API<br />

Enqueuing and Dequeuing Object Type Messages That Contain LOB Attributes<br />

<br />

Using Java<br />

The various implementations of the Java AQ API are managed with<br />

AQDriverManager. Both OLite and <strong>Oracle</strong>9i will have an AQDriver that is<br />

registered with the AQDriverManager. The driver manager is used to create an<br />

AQSession that can be used to perform messaging tasks.<br />

The <strong>Oracle</strong>8i AQ driver is registered using the Class.forName<br />

(“oracle.AQ.AQ<strong>Oracle</strong>Driver”) command.<br />

When the AQDriverManager.createAQSession() method is invoked, it calls the<br />

appropriate AQDriver (among the registered drivers) depending on the parameter<br />

passed to the createAQSession() call.<br />

The <strong>Oracle</strong>9i AQDriver expects a valid JDBC connection to be passed in as a<br />

parameter to create an AQSession. Users must have the execute privilege on the<br />

DBMS_AQIN package to use the AQ Java interfaces. Users can also acquire these<br />

rights through the AQ_USER_ROLE or the AQ_ADMINSTRATOR_ROLE. Users will<br />

also need the appropriate system and queue privileges for 8.1-style queue tables.<br />

Using <strong>Oracle</strong> Java Message Service to Access AQ<br />

Standard JMS Features<br />

Java Message Service (JMS): JMS is a messaging standard defined by Sun<br />

Microsystems, <strong>Oracle</strong>, IBM, and other vendors. JMS is a set of interfaces and<br />

associated semantics that define how a JMS client accesses the facilities of an<br />

enterprise messaging product.<br />

<strong>Oracle</strong> Java Message Service: <strong>Oracle</strong> Java Message Service provides a Java API for<br />

<strong>Oracle</strong> <strong>Advanced</strong> <strong>Queuing</strong> based on the JMS standard. <strong>Oracle</strong> JMS supports the<br />

standard JMS interfaces and has extensions to support the AQ administrative<br />

operations and other AQ features that are not a part of the standard.<br />

Standard JMS features include:<br />

Point-to-point model of communication - using queues<br />

Publish-subscribe model of communication - using topics<br />

3-8 <strong>Oracle</strong>9i Application Developer’s Guide - <strong>Advanced</strong> <strong>Queuing</strong>

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

Saved successfully!

Ooh no, something went wrong!