Oracle8i Application Developer's Guide - Advanced Queuing Release 2 (8.1.6) Part Number A76938-01 |
|
AQ Programmatic Environments, 6 of 10
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.
Oracle8i Supplied Java Packages Reference describes the common interfaces and classes based on current PL/SQL interfaces.
The Java AQ classes are located in $ORACLE_HOME
/rdbms
/jlib
/aqapi
.jar
. These classes can be used with any Oracle8i JDBC driver.
jmscommon.jar
and aqapi
.jar
files into the database using the "loadjava" utility.
Appendix A, "Oracle Advanced Queuing by Example" contains the following examples:
The various implementations of the Java AQ API are managed via an AQDriverManager
. Both OLite and Oracle8i will have an AQDriver
which is registered with the AQDriverManager
. The driver manager is used to create an AQSession
which 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 Oracle8i 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 in order 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.
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|