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

AQ Programmatic Environments, 6 of 9


Using AQ Java (oracle.AQ) Classes to Access AQ

Java AQ API supports both the administrative and operational features of Oracle AQ (Advanced Queueing). In developing Java programs for messaging applications, you will use JDBC to open a connection to the database and then the oracle.AQ, the Java AQ API for message queuing. This means that you will no longer need to use PL/SQL interfaces.

Oracle9i Supplied Java Packages Reference describes the common interfaces and classes based on current PL/SQL interfaces.

Accessing Java AQ Classes

The Java AQ classes are located in $ORACLE_HOME/rdbms/jlib/aqapi.jar. These classes can be used with any Oracle8i JDBC driver.

Advanced Queuing Examples

Appendix A, "Oracle Advanced Queuing by Example" contains the following examples:

Managing the Java AQ API

The various implementations of the Java AQ API are managed via an AQDriverManager. Both OLite and Oracle9i will have an AQDriver that is registered with the AQDriverManager. The driver manager is used to create an AQSession that can be used to perform messaging tasks.

The Oracle8i AQ driver is registered using the Class.forName ("oracle.AQ.AQOracleDriver") command.

When the AQDriverManager.createAQSession() method is invoked, it calls the appropriate AQDriver (amongst the registered drivers) depending on the parameter passed to the createAQSession() call.

The Oracle9i AQDriver expects a valid JDBC connection to be passed in as a parameter to create an AQSession. Users must have the execute privilege on the DBMS_AQIN package to use the AQ Java interfaces. Users can also acquire these rights through the AQ_USER_ROLE or the AQ_ADMINSTRATOR_ROLE. Users will also need the appropriate system and queue privileges for 8.1-style queue tables.


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