Skip Headers

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
Go To Table Of Contents
Contents
Go To Index
Index

Previous Next

1
Introduction

This chapter provides an overview of message queuing, IBM MQSeries, and the gateway's role when accessing MQSeries queues:

Introduction to Message Queuing

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).

Introduction to IBM MQSeries

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.

MQSeries Terms

Message queues are storage areas for messages exchanged between applications.
Message queue interface (MQI) is an application programming interface (API) for applications that want to send or receive messages through IBM MQSeries queues.
MQSeries client configuration is an MQSeries configuration where the queue manager and message queues are located on a different (remote) computer or node than the application software. Client applications connect to the remote queue manager using IBM software that provides the necessary networking software to connect to the remote queue manager.
MQSeries server configuration is an MQSeries configuration where the queue manager and message queues are located on the same (local) computer or node as the application software. Client applications connect to the local queue manager using MQI.
Queue manager provides the message queuing facilities that applications use, and manages the queue definitions, configuration tables, and message queues. The queue manager also forwards messages from the sender queue to the remote recipient queues.
Triggers is an MQSeries feature that enables an application to be started automatically when a message event, such as the arrival of a message, occurs. Triggers can be used to invoke programs or transactions. For example, a trigger could cause an Oracle application to call the gateway to retrieve an MQSeries message and process it.

Introduction to the Gateway

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.

Developing Gateway Applications

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.

Gateway Terms

Gateway initialization file is a file containing parameters that govern the operation of the gateway.
Gateway remote procedures are remote procedures implemented by the gateway.  These procedures are used to invoke MQSeries operations.
Message interface package (MIP) is an Oracle PL/SQL package generated by the Visual Workbench that serves as an interface between an existing MQSeries application and an Oracle application.  The MIP performs any necessary data conversion and invokes the gateway RPCs to perform appropriate MQSeries operations.  Refer to the Oracle Visual Workbench for Oracle Procedural Gateways for IBM MQSeries Installation and User's Guide for more information.
Oracle integrating server is any Oracle server that communicates with the gateway.  Oracle applications do not communicate directly with the gateway.  Instead they execute PL/SQL code at an Oracle integrating server to invoke the gateway procedures.  The Oracle integrating server can be on the same computer as the gateway or on a different computer.
production Oracle server as used in this book, production Oracle server refers to any Oracle server that you are using for production, for actual business, not for testing.
PL/SQL stored procedure is a compiled PL/SQL procedure that is stored in the Oracle integrating server or is included with the gateway.
Remote procedure call is a programming call that invokes a program on a system in response to a request from another system.
Visual Workbench An abbreviated term for the Oracle Visual Workbench for Oracle Procedural Gateways for IBM MQSeries.

Advantages of Using the Gateway

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.

Gateway Architecture

Figure 1-1 Components of the Gateway Architecture

Description of 01_01.gif is contained in the surrounding text

Component Descriptions

This section describes components of the gateway architecture.

Oracle Applications

Oracle applications connect to an Oracle integrating server.  They send data to, and receive data from, MQSeries queues by invoking the gateway RPCs.

Oracle Integrating Server

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

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. 

Gateway

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. 

MQSeries Queue Manager

The MQSeries server is where the MQSeries queue manager and message queue reside.  The MQSeries server might, or might not, be on the same computer as the gateway.

MQSeries Application

MQSeries applications connect directly to the MQSeries queue manager using MQSeries MQI calls to perform the appropriate MQSeries operation.

Gateway Structure

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.

Starting the Gateway

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. 

Communication

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.


Previous Next
Oracle Logo
Copyright © 2001, 2002 Oracle Corporation

All rights reserved
Go To Table Of Contents
Contents
Go To Index
Index