|
Oracle® Procedural Gateway and Tools for IBM MQSeries Installation and User's Guide
Release 9.2.0.1.0 for UNIX Part No. A96196-01 |
|
This chapter provides an overview of message queuing, IBM MQSeries, and the gateway's role when accessing MQSeries queues:
Message queuing allows distributed applications to communicate asynchronously by sending messages between the applications. The messages from the sending application are stored in a queue and are retrieved by the receiving application. The applications send or receive messages through a queue by sending a request to the message queuing system. Sending and receiving applications can use the same message queuing system or different ones, allowing the message queuing system to handle the forwarding of the messages from the sender queue to the recipient queue.
Queued messages can be stored at intermediate nodes until the system is ready to forward them to the next node. At the destination node, the messages are stored in a queue until the receiving application retrieves them from the queue. Message delivery is guaranteed even if the network or application fails. This provides for a reliable communication channel between the applications.
The complexity and details of the underlying model (to store and forward messages between different environments) are handled by the message queuing system. By maintaining this level of abstraction, distributed applications can be developed without the need to worry about the details of how the information is transported.
Because the sending and receiving applications operate independently of one another, the sending application is less dependent on the availability of the remote application, less dependent on the network between them, and less dependent on the computer system on which the receiving application runs. This leads to a higher level of availability for the participating applications.
Messages and message queue operations can be configured by the applications to operate in specific modes. For example, a sending application can specify that queued messages should survive system crashes. As another example, the receiving application can specify a maximum waiting period for a receiving operation from a queue (in case no messages are available yet on the receiving queue).
IBM MQSeries is a message queuing system based on a model of message queue clients and message queue servers. The applications run either on the server node where the queue manager and queues reside, or from a remote client node. Applications can send or retrieve messages only from queues owned by the queue manager to which they are connected.
The Oracle9i Procedural Gateway for IBM MQSeries allows Oracle applications to integrate with other MQSeries applications. Oracle applications can send messages to other MQSeries applications or receive messages from them. With the gateway, Oracle applications access IBM MQSeries message queues through remote procedure call (RPC) processing.
The gateway extends the remote procedure call (RPC) facilities that are available with the Oracle server and enables any client application to use PL/SQL to access messages in MQSeries queues. The gateway provides PL/SQL procedures that are translated by the gateway into MQI (message queue interface) calls. These procedures resemble the calls and types of MQI, but they are adapted to take full advantage of the transaction integration with the Oracle integrating server. For more information, refer to Appendix A, " The PGM8, PGM_UTL8, and PGM_SUP Packages".
Through MQSeries, the gateway communicates with any other MQSeries systems on various platforms, including mainframes, UNIX, Windows NT, and other desktop environments. The gateway does not require any Oracle software on the remote system. The gateway integrates with existing MQSeries applications without any changes to those applications and allows users to leverage their investment in these applications while providing them with the ability to exploit the benefits of message-oriented middle ware.
The gateway also provides a way to integrate these existing MQSeries applications with new technology areas, such as network computing. Any Oracle application can invoke the PL/SQL procedures, including applications that use the Oracle application server.
If you are developing applications that access MQSeries through the gateway, use the Oracle Visual Workbench for Oracle Procedural Gateways for IBM MQSeries. The Visual Workbench allows you to define an interface for accessing MQSeries and to define how to convert message data sent or retrieved from MQSeries queues.
The Visual Workbench generates PL/SQL code for the interface and data conversions. This generated code is called the message interface package (MIP). The MIP provides the underlying code to interact with the gateway, performs message data conversion, and provides an easy to use interface for Oracle applications to exchange messages with remote MQSeries applications. Refer to the Oracle Visual Workbench for Oracle Procedural Gateways for IBM MQSeries Installation and User's Guide for more information about Visual Workbench.
When necessary, the generated MIP code can be modified to use MQSeries functions that are not supported by Visual Workbench or can be modified to enhance the message data conversions. Refer to Appendix A, " The PGM8, PGM_UTL8, and PGM_SUP Packages" and Appendix B, " UTL_RAW Package" for more information.
Using the gateway to access MQSeries provides the following advantages:
Transactional support
The gateway and the Oracle integrating server allow MQSeries operations and Oracle integrating server updates to be performed in a coordinated fashion. Oracle two-phase commit protection is extended to the MQSeries environment without any special programming.
Fast remote procedures
The remote procedures implemented by the gateway are optimized for efficient processing of MQSeries requests.
The remote procedures to the gateway and MQSeries are an optimized PL/SQL package that is precompiled in the gateway. Because there are no additional software layers on the target system, overhead is minimized.
Location transparency
Client applications need not be specific to the operating system. For example, your Oracle application can send MQSeries messages to an application on IBM MVS. If the receiving application is moved to a different platform, then you do not need to change your Oracle application.
Flexible interface
Using the MIPs generated by the Visual Workbench, you can use the gateway to interface with existing procedural logic or to integrate new procedural logic into an Oracle integrating server environment.
Oracle integrating server integration
The integration of the Oracle integrating server with the gateway allows you to benefit from existing and future Oracle features.
Wide selection of tools
The gateway supports any tool or application that supports PL/SQL. This includes applications built with traditional Oracle tools, such as Developer/2000, or applications built for intranet or Internet environments supported by the Oracle Application Server. The gateway also works with packaged Oracle applications such as Oracle FinancialsÒ and with many third party tools such as Visual Basic, PowerBuilder, and Lotus Notes.
Security
The gateway is compatible with the MQSeries security authorization mechanism.
This section describes components of the gateway architecture.
Oracle applications connect to an Oracle integrating server. They send data to, and receive data from, MQSeries queues by invoking the gateway RPCs.
Oracle applications do not connect directly to the gateway, but connect indirectly by connecting to an Oracle integrating server. The Oracle integrating server communicates with a gateway in the normal Oracle server-to-server manner using Oracle Net. The gateway is a single process and does not start background processes. On UNIX platforms, a gateway process is started for each user session.
Oracle Net provides client-to-server and server-to-gateway communication. It enables an Oracle application to communicate with the Oracle integrating server, and it enables the Oracle integrating server to communicate with the gateway.
If the Oracle integrating server is not on the workstation where the gateway resides, then you must install the correct Oracle networking software on the platform where the Oracle integrating server resides.
The Oracle application invokes the RPCs (remote procedure calls) which are implemented by the gateway with PL/SQL. The gateway procedures map these RPCs to MQSeries MQI calls to perform the appropriate MQSeries operation.
The gateway is accessed through the Oracle integrating server by using a database link name created by an Oracle CREATE DATABASE LINK statement. The database link is the same construct used to identify other Oracle integrating server databases.
The gateway has some of the same components as an Oracle integrating server. The following components are included:
a directory where the gateway software is installed
a system identifier (SID)
an initialization file similar to the Oracle integrating server's initialization file
The gateway does not have control, redo, or database files, nor does it have the full set of subdirectories and other files associated with an Oracle integrating server.
The gateway is not started in the same way as the Oracle integrating server. It has no background processes and does not require a management utility such as the Oracle Enterprise Manager. Each Oracle integrating server user session that accesses a gateway creates an independent process on the host computer that runs the gateway.
All communication between the Oracle integrating server, gateway, and MQSeries queues is handled through RPC calls to the gateway. The PL/SQL code to do these calls is automatically generated by the Visual Workbench. For more information, refer to Appendix A, " The PGM8, PGM_UTL8, and PGM_SUP Packages" or the Oracle Visual Workbench for Oracle Procedural Gateways for IBM MQSeries Installation and User's Guide.
|
![]() Copyright © 2001, 2002 Oracle Corporation All rights reserved |
|