Oracle Procedural Gateway® for WebSphere MQ Installation and User's Guide 10g Release 2 (10.2) for UNIX Part Number B16215-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 systems, 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 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 message queue interface (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 to Appendix A.
Through WebSphere MQ, the gateway communicates with any other WebSphere MQ systems on various platforms, including mainframes, UNIX, Windows, and other desktop environments. The gateway does not require any Oracle software on the remote system. It integrates with existing WebSphere MQ applications without any changes to those applications. It 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 that 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 Visual Workbench for Oracle Procedural Gateways for IBM MQSeries Installation and User's Guide for more information about Oracle Visual Workbench. |
When necessary, the generated MIP code can be modified to use WebSphere MQ functions that are not supported by Oracle 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.
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 Oracle 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 the 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 with 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 invokes 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 all 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.