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 AQDriver Manager. The driver manager is used to create an AQSession which can be used to perform messaging tasks.
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.
getDriverspublic static java.util.Vector getDrivers()
This method returns the list of drivers registered with the driver manager. It returns a Vector of strings containing the names of the registered drivers.
getAQSessionpublic static AQSession getAQSession (java.lang.Object conn)
This method creates an AQSession.
If the user is using the AQOracleDriver, then the object passed in must be a valid JDBC connection.
Multithreaded Program Support
Currently Java AQ objects are not thread safe. Therefore, methods on AQSession, AQQueueTable, AQQueue and other AQ objects should not be called concurrently from different threads. You can pass these objects between threads, but the program must ensure that the methods on these AQ objects are not invoked concurrently.
We recommend that multithreaded programs create a different AQSession in each thread (using the same or a different JDBC connection) and get new queue table and queue handles using the getQueueTable and getQueue methods in AQSession.
Loading the Java AQ Driver
To create an AQSession, you must first open a JDBC connection. Then you must load the AQDriver that you need to use in the application. With Oracle8i, the driver is loaded using the Class.forName("oracle.AQ.AQOracleDriver") command.
Note that the driver needs to be loaded only once (before the first createAQSession call). Loading the driver multiple times will have no effect.
In general use only the interfaces and classes that are common to both implementations (as described in the first two tables). This will ensure that your applications are portable between Oracle8i and Olite AQ implementations.
oracle.AQ classes should not be used unless there is a method in these classes that is not available in the common interfaces. Note that since the AQQueue interface extends AQQueueAdmin, all queue administrative and operation functionality is available via AQQueue.
Oracle 9i Related Interview Questions
|Oracle 10g Interview Questions||Oracle 9i Interview Questions|
|Oracle 8i Interview Questions||Informatica Interview Questions|
|PL/SQL Interview Questions||Oracle 11g Interview Questions|
|SQL Interview Questions||Oracle apps Interview Questions|
|Sybase Interview Questions||Oracle Apps ERP Interview Questions|
|Oracle 7.3 Interview Questions||Oracle Access Manager Interview Questions|
|Oracle Application Framework Interview Questions||Oracle Apps DBA Interview Questions|
Oracle 9i Related Practice Tests
|Oracle 10g Practice Tests||Oracle 9i Practice Tests|
|Oracle 8i Practice Tests||Informatica Practice Tests|
|PL/SQL Practice Tests||Oracle 11g Practice Tests|
|SQL Practice Tests||Oracle apps Practice Tests|
|Sybase Practice Tests||Oracle Apps ERP Practice Tests|
|Oracle 7.3 Practice Tests|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.