WebSphere MQ classes for Java
Introduction
WebSphere MQ classes for Java, also referred to as WebSphere MQ base Java, allow a program written in the Java programming language to:
- Connect to WebSphere MQ as a WebSphere MQ client
- Connect directly to a WebSphere MQ server
WebSphere MQ base Java enables Java applets, applications, and servlets to issue calls and queries to WebSphere MQ. This gives access to mainframe and legacy applications, typically over the Internet, without necessarily having any other WebSphere MQ code on the client machine. With WebSphere MQ base Java, Internet users can become true participants in transactions, rather than just givers and receivers of information.
WebSphere MQ classes for JMS
WebSphere MQ classes for JMS (also referred to as WebSphere MQ JMS) is a set of Java classes that implement Sun's JMS interfaces to enable JMS programs to access WebSphere MQ systems. Both the point-to-point and publish/subscribe models of JMS are supported.
Using WebSphere MQ JMS as the API to write WebSphere MQ applications has a number of benefits. Some advantages derive from JMS being an open standard with multiple implementations. Other advantages come from additional features that are present in WebSphere MQ JMS, but not in WebSphere MQ base Java.
Benefits arising from the use of an open standard include:
- The protection of investment, both in skills and application code
- The availability of people skilled in JMS application programming
- The ability to plug in different JMS implementations to fit different requirements
The extra function provided over WebSphere MQ base Java includes:
- Asynchronous message delivery. Messages can be delivered to an application as they arrive, on a separate thread.
- Message selectors.
- Support for publish/subscribe messaging.
- Structured, more abstract, message classes. Implementation details are left to the JMS provider.
Prerequisites
To run WebSphere MQ base Java, you need the following software:
- WebSphere MQ for the server platform you want to use.
- JDK for the server platform.
- JDK, JRE, or Java-enabled Web browser for client platforms
The following list shows supported J2SDKs and JREs:
- IBM Developer Kit for AIX, Java Technology Edition, Version 1.3.1
- IBM Developer Kit for Linux, Java Technology Edition, Version 1.3.1
- IBM Developer Kit for Windows, Java Technology Edition, Version 1.3.0
- HP-UX SDK, for the Java platform, Version 1.3.1
- Java 2 Standard Edition, for the Solaris Operating Environment, SDK 1.3.1
To fully support SSL authentication, you need a JRE at Version 1.4.0 for your platform. SSL support enables WebSphere MQ Java and JMS applications to benefit from secure connection to the queue manager, providing authentication, message integrity, and data encryption.
Check the README file for the latest information about operating system levels this product has been tested against.
To use the WebSphere MQ JMS administration tool, you need one of the following service provider packages, supplied with WebSphere MQ:
- LDAP - ldap.jar, providerutil.jar.
- File system - fscontext.jar, providerutil.jar.
These packages provide the JNDI service. This is the resource that stores physical representations of the administered objects. Users of WebSphere MQ JMS probably use an LDAP server for this purpose, but the tool also supports the use of the file system context service provider. If you use an LDAP server, configure it to store JMS objects.
To use publish/subscribe applications, you need one of the following:
- SupportPac MA0C: MQSeries Publish/Subscribe
- WebSphere MQ Integrator Version 2
- WebSphere MQ Event Broker
Connection options
Programmable options allow WebSphere MQ Java to connect to WebSphere MQ in either of the following ways:
- As a WebSphere MQ client using Transmission Control Protocol/Internet Protocol (TCP/IP)
- In bindings mode, connecting directly to WebSphere MQ
In addition, WebSphere MQ JMS publish/subscribe applications can connect directly across TCP/IP to the IBM WebSphere MQ Event Broker program.
Client connection
To use WebSphere MQ Java as a WebSphere MQ client, you can install it either on the WebSphere MQ server machine, which may also contain a Web server, or on a separate machine. If you install WebSphere MQ Java on the same machine as a Web server, you can download and run WebSphere MQ client applications on machines that do not have WebSphere MQ Java installed locally.
Wherever you choose to install the client, you can run it in three different modes:
- From within any Java-enabled Web browser
- In this mode, the locations of the WebSphere MQ queue managers that can be accessed are constrained by the security restrictions of the browser that is used.
- Using an appletviewer
- To use this method, have the JDK or JRE installed on the client machine.
- As a standalone Java program or in a Webapp server
- To use this method, have the JDK or JRE installed on the client machine.
Bindings connection
When used in bindings mode, WebSphere MQ Java uses the Java Native Interface to call directly into the existing queue manager API, rather than communicating through a network. This provides better performance for WebSphere MQ applications than using network connections. Unlike the client mode, applications that are written using the bindings mode cannot be downloaded as applets.
To use the bindings connection, install WebSphere MQ Java on the WebSphere MQ server.
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.