Oracle Procedural Gateway® for WebSphere MQ Installation and User's Guide, 10g Release 2 (10.2) for Windows Part Number B16216-01 |
|
|
View PDF |
This chapter provides an overview of message queuing, WebSphere MQ, and the role of the gateway when accessing WebSphere MQ queues. It contains the following sections:
Message queuing enables 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 or different message queuing system , enabling 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 applications.
The complexity and details of the underlying model (of storing and forwarding 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, the network between them, and the 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).
WebSphere MQ is a message queuing system based on the 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 on a remote client node. Applications can send or retrieve messages only from queues owned by the queue manager to which they are connected.
The following table describes WebSphere MQ terms used in this guide.
The Oracle Procedural Gateway for WebSphere MQ enables Oracle applications to integrate with other WebSphere MQ applications. Oracle applications can send messages to other WebSphere MQ applications or receive messages from them. With the gateway, Oracle applications access WebSphere MQ message queues through remote procedure call (RPC) processing.
The gateway extends the RPC facilities that are available with the Oracle server and enables any client application to use PL/SQL to access messages in WebSphere MQ queues. The gateway provides PL/SQL procedures that are translated by the gateway into MQI 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 about these procedures, refer toAppendix A .
Through WebSphere MQ, the gateway communicates with any other WebSphere MQ systems on various platforms, including mainframes, UNIX, Microsoft Windows, and other desktop environments. The gateway does not require any Oracle software on the remote system. The gateway integrates with existing WebSphere MQ applications without any changes to those applications and enables users to exploit their investment in these applications while providing them with the ability to maximize on the benefits of message-oriented systems.
The gateway also provides a way to integrate these existing WebSphere MQ applications with new technology areas, such as network computing. Any Oracle application can invoke PL/SQL procedures, including applications that use the Oracle Application Server 10g.
If you are developing applications that access WebSphere MQ through the gateway, use the Oracle Visual Workbench for Oracle Procedural Gateways for WebSphere MQ. Oracle Visual Workbench enables you to define an interface for accessing WebSphere MQ and define how to convert message data thaty is sent or retrieved from WebSphere MQ queues.
Oracle Visual Workbench generates PL/SQL code for the interface and data conversion. 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 WebSphere MQ applications.
See Also: Refer to the Oracle Procedural Gateway Visual Workbench for WebSphere MQ Installation and User's Guide for Microsoft Windows (32-Bit) for more information about Visual Workbench. |
When necessary, the generated MIP code can be modified to use WebSphere MQ functions that are not supported by Visual Workbench or to enhance message data conversions. Refer to Appendix A and Appendix B for more information about modifying the generated MIP code.
The following table describes gateway terms used in this guide.
Term | Description |
---|---|
Gateway initialization file | A file containing parameters that determine the running of the gateway. |
Gateway remote procedures | Remote procedures implemented by the gateway. These procedures are used to invoke WebSphere MQ operations. |
MIP (Message interface package) | An Oracle PL/SQL package generated by Oracle Visual Workbench that serves as an interface between an existing WebSphere MQ application and an Oracle application. The MIP performs any necessary data conversion and invokes the gateway RPCs to perform appropriate WebSphere MQ operations. Refer to the Oracle Procedural Gateway Visual Workbench for WebSphere MQ Installation and User's Guide for Microsoft Windows (32-Bit) for more information about the generated packages. |
Oracle integrating server | Any Oracle server that communicates with the gateway. Oracle applications do not communicate directly with the gateway. Instead, they run PL/SQL code at an Oracle integrating server to invoke the gateway procedures. The Oracle integrating server can be on the same system as the gateway or on a different system. |
Production Oracle server | As used in this guide, the production server refers to any Oracle server that you use for production, for actual business and not for testing. |
PL/SQL stored procedure | A compiled PL/SQL procedure that is stored in the Oracle integrating server or is included with the gateway. |
Remote procedure call | A programming call that invokes a program on a system in response to a request from another system. |
Oracle Visual Workbench | An abbreviated term for the Oracle Visual Workbench for Oracle Procedural Gateways for WebSphere MQ. |
Using the gateway to access WebSphere MQ provides the following advantages:
Transactional support
The gateway and the Oracle integrating server enable WebSphere MQ operations and Oracle integrating server updates to be performed in a coordinated fashion. Oracle two-phase commit protection is extended to the WebSphere MQ environment without any special programming.
Fast remote procedures
The remote procedures implemented by the gateway are optimized for efficient processing of WebSphere MQ requests.
The remote procedures to the gateway and WebSphere MQ 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 on a specific operating system. For example, your Oracle application can send WebSphere MQ messages to an application on IBM MVS. If the receiving application is moved to a different platform, then you do not need to change the platform of your Oracle application.
Flexible interface
Using the MIPs generated by the Visual Workbench, you can use the gateway to interface with the 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 enables 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 Oracle Developer, or applications built for intranet or Internet environments supported by Oracle Application Server 10g. The gateway also works with packaged Oracle applications, such as Oracle Financials, and many third-party tools, such as Visual Basic, PowerBuilder, and Lotus Notes.
Security
The gateway is compatible with the WebSphere MQ security authorization mechanism.
Figure 1-1 shows the components of the gateway architecture.
Figure 1-1 Components of the Gateway Architecture
This section describes components of the gateway architecture.
Oracle applications connect to an Oracle integrating server. They send data to and receive data from WebSphere MQ queues by invoking the gateway RPCs.
Oracle applications do not connect directly to the gateway, but connect indirectly through 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 same system as the gateway, then you must install the correct Oracle networking software on the platform where the Oracle integrating server is installed.
Oracle applications invoke the RPCs that are implemented by the gateway with PL/SQL. The gateway procedures map these RPCs to WebSphere MQ MQI calls to perform the corresponding WebSphere MQ 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 construct used to identify 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 initialization parameter 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 Oracle Enterprise Manager. Each Oracle integrating server user session that accesses a gateway creates an independent process on the host system that runs the gateway.