|Oracle9i Application Developer's Guide - Advanced Queuing
Release 1 (9.0.1)
Part Number A88890-02
This section describes the new Advanced Queuing features of Oracle9i and previous releases.
The following sections describe the new features in Oracle Advanced Queuing:
Oracle9i introduces the following new Advanced Queuing features to improve e-business integration and use standard Internet transport protocols:
To perform queuing operations over the Internet, Advanced Queuing takes advantage of the Internet Data Access Presentation (IDAP), which defines message structure using XML. Using IDAP, AQ operations such as enqueue, dequeue, notification, and propagation can be executed using standard Internet transport protocols--HTTP(S) and SMTP. Third-party clients, including third-party messaging vendors, can also interoperate with AQ over the Internet.
IDAP messages can be requests, responses, or an error response. An IDAP document sent from an AQ client contains an attribute for designating the remote operation; that is, enqueue, dequeue, or register accompanied by operational data. The AQ implementation of IDAP can also be used to execute batched enqueue and dequeue of messages.
The HTTP and SMTP support in AQ is implemented by using the AQ servlet which is bundled with the Oracle database server. A client invokes the servlet through an HTTP post request that is sent to the Web server. The Web server invokes the servlet mentioned in the post method if one is not already invoked. The servlet parses the content of the IDAP document and uses the AQ Java API to perform the designated operation. On completion of the call, the servlet formats either a response or an error response as indicated by IDAP and sends it back to the client.
IDAP is transport independent and therefore can work with other transport protocols transparently. Oracle9i supports HTTP and SMTP; other proprietary protocols can also be supported using the callout mechanism through transformations.
AQ functionality allows only authorized Internet users to perform AQ operations on AQ queues. An Internet user connects to a Web server, which in turn connects to the database using an application server. The Internet user doing the operation is typically not the database user connected to the database. Also, the AQ queues may not reside in the same schema as the connected database user. Advanced Queuing uses proxy authentication so that only authorized Internet users can perform AQ operations on AQ queues.
OID Integration: To leverage LDAP as the single point for managing generic information, Advanced Queuing is integrated with the Oracle Internet Directory (OID) server. This addresses the following requirements:
XML Integration: XML has emerged as a standard for e-business data representations. The XMLType datatype has been added to the Oracle server to support operations on XML data. AQ not only supports XMLType data type payloads, but also allows definitions of subscriptions based on the contents of an XML message. This is powerful functionality for online market places where multiple vendors can define their subscriptions based on the contents of the orders.
Applications are designed independent of each other. So, the messages they understand are different from each other. To integrate these applications, messages have to be transformed. There are various existing solutions to handle these transformations. AQ provides a transformation infrastructure that can be used to plug in transformation functionality from Oracle Application Interconnect or other third-party solutions such as Mercator without losing AQ functionality. Transformations can be specified as PL/SQL call back functions, which are applied at enqueue, dequeue, or propagation of messages. These PL/SQL callback functions can call third-party functions implemented in C, Java, or PL/SQL. XSLT transformations can also be specified for XML messages.
You can use new and enhanced Oracle Enterprise Manager to manage Advanced Queuing, as follows:
Oracle diagnostics and tuning pack supports alerts and monitoring of AQ queues. Alerts can be sent when the number of messages for a particular subscriber exceeds a threshold. Alerts can be sent when there is an error in propagation. In addition, queues can be monitored for the number of messages in ready state or the number of messages per subscriber.
PL/SQL notifications and e-mail notifications: Oracle9i allows notifications on the queues to be PL/SQL functions. Using this functionality, users can register PL/SQL functions that will be called when a message of interest is enqueued. Using e-mail notification functionality, an e-mail address can be registered to provide notifications. E-mail will be sent if the message of interest arrives in the queue. Presentation of the e-mail message can also be specified while registering for e-mail notification. Users can also specify an HTTP URL to which notifications can be sent.
Dequeue enhancements: Using the dequeue with a condition functionality, subscribers can select messages that satisfy a specified condition from the messages meant for them.
Overall performance improvements: AQ exhibits overall performance improvements as a result of code optimization and other changes.
Propagation enhancements: The maximum number of job queue processes has been increased from 36 to 1000 in Oracle9i. With Internet propagation, you can set up propagation between queues over HTTP. Overall performance improvements have been made in propagation due to design changes in the propagation algorithm.
All the new Oracle9i features are supported through JMS, as well as the following:
The Oracle8i release included the following Advanced Queuing features: