Beruflich Dokumente
Kultur Dokumente
WebSphere Application
Server V5 and WebSphere
MQ
Q Family Integration
Asynchronous integration scenarios
with WebSphere products
Deployable sample
application
Jill Lennon
Ashok Ambati
Bill Moore
John W. Mount
Fred Plassman
Mark Smith
Peter von Hirschfeld
ibm.com/redbooks
International Technical Support Organization
October 2003
SG24-6878-00
Note: Before using this information and the product it supports, read the information in
“Notices” on page xi.
This edition applies to WebSphere Application Server Version V5 on Windows 2000 Server, AIX
5.1 ML 2 platforms; MQSeries Version 5.2.1 on Windows 2000 Server; WebSphere MQ Version
5.3.0.1 on Windows 2000 Server and AIX 5.1 ML 2 platforms; WebSphere MQ Integrator Broker
Version 2.1 on Windows 2000 Server; WebSphere MQ Event Broker Version 2.1 with CSD3 on
Windows 2000 Server; WebSphere Studio Application Developer Version 5 on Windows 2000
Professional.
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
The team that wrote this redbook. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Chapter 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 Introducing the products we will use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Integration scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Chapter 4. Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.1 Considering different scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.2 Comparison of publish/subscribe functionality . . . . . . . . . . . . . . . . . . . . . 37
4.2.1 Basic WebSphere MQ publish/subscribe function . . . . . . . . . . . . . . 37
4.2.2 WebSphere MQ Event Broker publish/subscribe function . . . . . . . . 37
4.2.3 Publish/subscribe function in the other Integrator brokers . . . . . . . . 38
4.2.4 Migration from “basic” pub/sub to a WebSphere MQ broker. . . . . . . 38
4.3 Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.4 Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.5 Case 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.6 Case 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.7 Case 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.7.1 Case 5a. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.7.2 Case 5b. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.7.3 Case 5c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Contents v
8.1.5 Sub-group 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
8.2 Application verification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
8.3 Deployment of order entry application. . . . . . . . . . . . . . . . . . . . . . . . . . . 159
8.3.1 Instructions to download application . . . . . . . . . . . . . . . . . . . . . . . . 159
8.3.2 Setting up the database tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
8.3.3 Connecting WebSphere Application Server to the database . . . . . 159
8.3.4 Creation of JMS entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
8.3.5 Installation of order entry application . . . . . . . . . . . . . . . . . . . . . . . 171
8.4 Using the order entry application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
8.4.1 Creating orders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
8.4.2 Verifying the behavior of the order entry application. . . . . . . . . . . . 176
8.5 Code snippets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
8.5.1 Scenario 1: Decoupling applications and database . . . . . . . . . . . . 179
8.5.2 Scenario 2: Sending messages to multiple destinations . . . . . . . . . 182
8.5.3 Scenario 3: Publish/subscribe model of shared data . . . . . . . . . . . 183
Contents vii
11.3 Support for JMS messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
11.3.1 Asynchronous message handling in message-driven beans . . . . 265
11.4 Support for transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
11.4.1 Container-managed transactions . . . . . . . . . . . . . . . . . . . . . . . . . 266
11.4.2 Bean-managed transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
11.4.3 MDBs with container-managed transactions. . . . . . . . . . . . . . . . . 267
11.4.4 MDBs with bean-managed transactions . . . . . . . . . . . . . . . . . . . . 267
11.4.5 Creation of a new JMS session in a transaction . . . . . . . . . . . . . . 268
11.4.6 Use of XA resources in a transaction . . . . . . . . . . . . . . . . . . . . . . 268
11.5 Architecture of two-phase commit application . . . . . . . . . . . . . . . . . . . . 268
11.5.1 Steps performed by the application client . . . . . . . . . . . . . . . . . . . 271
11.5.2 Steps performed by the OrderConfirm MDB . . . . . . . . . . . . . . . . . 271
11.5.3 Steps performed by the UpdateCustomer MDB . . . . . . . . . . . . . . 271
11.6 Deployment of two-phase commit application . . . . . . . . . . . . . . . . . . . . 272
11.6.1 Instructions to download application . . . . . . . . . . . . . . . . . . . . . . . 272
11.6.2 Database setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
11.6.3 Creation of JMS entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
11.6.4 Installation of two-phase commit application. . . . . . . . . . . . . . . . . 274
11.7 Using the two-phase commit application. . . . . . . . . . . . . . . . . . . . . . . . 274
11.8 Verification of server-side components . . . . . . . . . . . . . . . . . . . . . . . . . 276
11.8.1 Effect on database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
11.8.2 Contents of WebSphere Application Server logs . . . . . . . . . . . . . 277
11.9 Code in two-phase commit application . . . . . . . . . . . . . . . . . . . . . . . . . 279
11.9.1 Application client code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
11.9.2 OrderConfirm MDB - container-managed transactions . . . . . . . . . 281
11.9.3 OrderConfirm MDB - bean-managed transactions . . . . . . . . . . . . 284
11.10 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Contents ix
Appendix A. WebSphere MQ SupportPacs . . . . . . . . . . . . . . . . . . . . . . . . 411
A.1 MA88: MQSeries classes for Java and Java Message Service . . . . . . . 412
A.1.1 MQSeries classes for Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
A.1.2 MQSeries classes for Java Message Service (JMS) . . . . . . . . . . . 412
A.2 MA0C: MQSeries - Publish/Subscribe . . . . . . . . . . . . . . . . . . . . . . . . . . 413
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult
your local IBM representative for information on the products and services currently available in your area.
Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product, program, or service that
does not infringe any IBM intellectual property right may be used instead. However, it is the user's
responsibility to evaluate and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this document.
The furnishing of this document does not give you any license to these patents. You can send license
inquiries, in writing, to:
IBM Director of Licensing, IBM Corporation, North Castle Drive Armonk, NY 10504-1785 U.S.A.
The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION
PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer
of express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made
to the information herein; these changes will be incorporated in new editions of the publication. IBM may
make improvements and/or changes in the product(s) and/or the program(s) described in this publication at
any time without notice.
Any references in this information to non-IBM Web sites are provided for convenience only and do not in any
manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the
materials for this IBM product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.
Information concerning non-IBM products was obtained from the suppliers of those products, their published
announcements or other publicly available sources. IBM has not tested those products and cannot confirm
the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on
the capabilities of non-IBM products should be addressed to the suppliers of those products.
This information contains examples of data and reports used in daily business operations. To illustrate them
as completely as possible, the examples include the names of individuals, companies, brands, and products.
All of these names are fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrates programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs in
any form without payment to IBM, for the purposes of developing, using, marketing or distributing application
programs conforming to the application programming interface for the operating platform for which the
sample programs are written. These examples have not been thoroughly tested under all conditions. IBM,
therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. You may copy,
modify, and distribute these sample programs in any form without payment to IBM for the purposes of
developing, using, marketing, or distributing application programs conforming to IBM's application
programming interfaces.
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the
United States, other countries, or both.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun
Microsystems, Inc. in the United States, other countries, or both.
Other company, product, and service names may be trademarks or service marks of others.
This IBM Redbook will help you install, tailor and configure the new Embedded
Messaging function in WebSphere® Application Server V5. In addition, the IBM®
WebSphere MQ family products are reviewed and positioned with regard to
Embedded Messaging.
Part 2, “Example scenarios” on page 65, which is the vast majority of the book,
covers the different integration scenarios using the WebSphere product family.
These scenarios include WebSphere Application Server with embedded JMS
messaging, with external MQ and JMS messaging, and with external generic
messaging providers. Integration goes further than just product integration. It
includes samples of using WebSphere MQ Integrator for integrating solutions.
Fred Plassman is Program Manager for IBM’s MQ Beta programs in the United
States. He has over 20 years of experience in the IT industry, with experience on
many platforms. His areas of expertise include asynchronous messaging and
project management. He has developed and provided technical education for
various IBM system management products.
Peter von Hirschfeld is a Senior I/T Specialist with IBM Global Services in Cape
Town, South Africa. He has five years of experience in the MQSeries field. He
holds a post-graduate degree in psychology from the University of South Africa.
His areas of expertise include customer support and consulting for MQSeries
and CICS®. He has co-written two other IBM Redbooks™ in the field of
e-business solutions for S/390®.
Carla Sadtler
International Technical Support Organization, Raleigh Center
Niall Clifford
WebSphere Messaging Communications Team Leader, IBM Hursley
Jamie Roots
WebSphere Messaging Development, IBM Hursley
Kyle Schlosser
Component Broker Development, IBM Rochester
Ian Vanstone
WebSphere MQ Development, IBM Hursley
Preface xv
Become a published author
Join us for a two- to six-week residency program! Help write an IBM Redbook
dealing with specific products or solutions, while getting hands-on experience
with leading-edge technologies. You'll team with IBM technical professionals,
Business Partners and/or customers.
Your efforts will help increase product acceptance and customer satisfaction. As
a bonus, you'll develop a network of contacts in IBM development labs, and
increase your productivity and marketability.
Find out more about the residency program, browse the residency index, and
apply online at:
ibm.com/redbooks/residencies.html
Comments welcome
Your comments are important to us!
Part 1 Exploring
messaging
options
Chapter 1. Introduction
This chapter provides an overview of the various products described in this
redbook, as well as some terms that will be used throughout. It is not intended to
be a thorough discussion of each of these products and terms.
The architect will be able to build solutions to various business case scenarios,
which will utilize different combinations of the above technologies. A step-by-step
guide will help the architect get hands-on experience in building integrated
solutions that will also display some of the new features in the latest release of
WebSphere Application Server and the release of WebSphere MQ Event Broker.
The discussion will also include the supported platforms, databases, migration
considerations, and product dependencies, as well as any installation and
configuration requirements.
The first part of this book gives detailed information about the products listed
above and provides detailed instructions for installing these particular products.
The Appendixes provide further information about the sample application used
for this book. The sample application shows the capabilities of each scenario
described in Part 2.
Chapter 1. Introduction 5
6 WebSphere Application Server and WebSphere MQ Family Integration
2
Note: We will use MQSeries Version 5.2.1 as a Generic JMS Provider. See
Chapter 14, “Generic JMS Provider scenario” on page 349.
2.1.1 WebSphere MQ
In this section, we discuss considerations for using WebSphere MQ Version
5.3.0.1 and prior releases that are important for positioning with other members
of the WebSphere MQ product family.
Note: As we proceed, more will be said about this last statement. Be aware
that when using SSL within WebSphere MQ V5.3.0.1, you must use the
WebSphere Generic JMS Provider, not the WebSphere MQ JMS Provider.
MQSeries SupportPac MA88 - MQSeries classes for Java and Java Message
Service for MQSeries is used in the section about the Generic JMS Provider.
Refer to Chapter 14, “Generic JMS Provider scenario” on page 349 for more
information.
WebSphere MQ publish/subscribe
Publish/subscribe is provided by:
WebSphere MQ SupportPac MA0C: MQSeries - Publish/Subscribe
WebSphere MQ Event Broker Version 2.1
WebSphere MQ Integrator Broker Version 2.1
WebSphere MQ clusters
WebSphere MQ supports MQ clusters. There are two reasons for using clusters:
1. Reduced system administration.
As soon as you start to establish even a small cluster, you will benefit from
simplified system administration. Establishing a network of queue managers
in a cluster involves fewer definitions than establishing a network that is to
use distributed queuing. With fewer definitions to make, you can set up or
change your network more quickly and easily, and reduce the risk of making
an error in your definitions.
2. Continuous operations and workload balancing.
Simple clusters give you easier system administration. Moving to more
complicated clusters offers improved scalability of the number of instances of
a queue you can define, providing continuous operations. Because you can
define instances of the same queue on more than one queue manager, the
workload can be distributed throughout the queue managers in a cluster.
Usage scenarios
Customers that do not require the full functions of the WebSphere MQ can use
the Embedded Messaging (internal JMS provider), which will simplify the
configuration and management of messaging.
Customers currently using the full functions of the WebSphere MQ products are
expected to remain using the full-function products and can completely ignore
Embedded Messaging (internal JMS provider).
In the current release of WebSphere software, there are five products available
that can supply a broker environment. These are:
WebSphere Application Server with Embedded Messaging
WebSphere MQ SupportPac MA0C - Publish/Subscribe
WebSphere MQ Event Broker
WebSphere MQ Integrator Broker
WebSphere MQ Integrator
We did not use WebSphere MQ Integrator in this IBM Redbook. For more
information on WebSphere MQ Integrator, use the following URL:
http://www-3.ibm.com/software/ts/mqseries/integrator/v21/index.html
Previously Available
Currently Available
Websphere
WebSphere Websphere Websphere
WebSphere MA0C MQ
Application MQ MQ Event
MQ v5.3 Support Pac Integrator
Server V5 Integrator Broker
Broker
To use the “MQ Provider”, we install and configure WebSphere MQ and possibly
WebSphere Event Broker, and then configure the Application Server to connect
to it instead of the Embedded Provider. The MQ products may be installed onto
the same machine as the Application Server, or on a different machine. It is
necessary to separately install the MQ JMS client into the Application Server
environment. The Embedded Messaging Client component of the Application
Server install provides all that is needed to make transactional connections both
to the Embedded Provider and the MQ Provider.
For more information on WebSphere MQ Event Broker, use the following URL:
http://www-3.ibm.com/software/ts/mqseries/eventbroker/
C:\mq WebSphere MQ
Application server
This is the primary component in WebSphere. The base application server
includes the code for the V5.0 Application Server, which is in full compliance with
J2EE 1.3.
Application client
The IBM WebSphere Application Server ships with several different types of
application clients. An application client is the interface an application will use to
communicate to services provided by applications running on WebSphere
Application Server. The application clients available are:
ActiveX application client
Applet application client
J2EE application client
Pluggable and thin application clients
Deployment Manager
The Deployment Manager is a process provided by the application server to
communicate with independent Node Agents (installed with the base WebSphere
Application Server), running in each node in the cell as lightweight (partial J2EE
environment) JVM processes. Node Agents coordinate such events as
configuration synchronization. The Deployment Manager manages all the nodes
in a distributed topology.
Edge Components
Edge Components provide a workload management solution that is fully
integrated with the WebSphere platform. As part of the workload management
solution, a Workload Management Controller can be implemented to provide
end-to-end monitoring and weighting of WebSphere Servlet and Enterprise Java
Bean containers. This will enable dynamic changes in the workload distribution
UDDI Registry
UDDI stands for Universal Description, Discovery, and Integration. UDDI is a
specification that helps to locate services provided through a service broker. It is
an essential element for brokers to use to run a registry of services. It enables
the enterprise to run its own Web Services broker within the company or provide
brokering services to the outside world.
WebSphere MQ V5.3.0.1
WebSphere Application Server Enterprise V5 is shipped with a fully functional
version of WebSphere MQ Version 5.3.0.1.
Key features
There are several features that are common to both the point-to-point and
publish/subscribe functions:
The integral JMS provider supports the requirements of the J2EE 1.3
specification.
Security is integrated with the WebSphere Application Server security
system, with user and group access being configured using the WebSphere
Application Server administration tools.
The JMS Server hosts the broker and manages the external WebSphere MQ
processes.
All JMS client access, either point-to-point or publish/subscribe, is performed
using WebSphere MQ (TCP/IP).
Key features
The WebSphere MQ JMS provider supplies the following features that are not
supported by the integral JMS provider of WebSphere Application Server V5:
Full support for the WebSphere MQ API.
Key features
Generic JMS Providers have the following key features:
Not limited to WebSphere MQ messaging systems
This may allow integration into non-WebSphere MQ based environments.
Provides local JNDI aliases for the real JMS connection factory and JMS
Destination objects configured into the external namespace, hiding the use of
an external provider and its resources from the application.
Chapter 4. Migration
This chapter discusses issues that you might need to consider when migrating
from your current environment to a new one. There are many different scenarios
imaginable, and it would be difficult to try to cover all possible combinations. We
will therefore define a few likely options and discuss these in more detail.
Figure 4-1 is a road map of platforms and software configurations that you might
currently have installed. It also explains graphically how certain features that you
may have used or know about fit together. However, it does not attempt to be an
exhaustive list of all possible combinations of software and platforms in the
WebSphere Application Server and messaging environments.
WebSphere WebSphere
MQSeries MA0C
Application MQ
V5.2 Support Pac
Server V4 Integrator
Previously Available
Currently Available
WebSphere
WebSphere WebSphere WebSphere
WebSphere MA0C MQ
Application MQ MQ Event
MQ V5.3 Support Pac Integrator
Server V5 Integrator Broker
Broker
Note: In the following discussion, we use the term “broker” family to refer to
WebSphere MQ Integrator Broker and WebSphere MQ Integrator generically.
Chapter 4. Migration 37
– WebSphere MQ (input and output nodes)
– WebSphere MQ Everyplace® (input and output nodes)
Support on a wider range of platforms than MA0C (for example the “basic”
publish/subscribe functionality in MA0C is not available under Linux for z/OS,
Windows XP and native z/OS).
By using the JMSIPInput node as the input node for a message flow, you can set
up an environment ideal for high-speed, nonpersistent publish/subscribe
messages. This node “listens” directly on a TCP/IP port for messages, without
using the full WebSphere MQ transport protocol. This might be useful, for
example, where you are running a stock market publish/subscribe application
where the subscribers require high-speed, almost real-time access to changes in
stock prices.
You can also use the JMSIPOptimizedFlow node, which has an internalized
message input and output. The node is deployed as a message flow itself, and
brokers can publish or subscribe directly to the message flow.
The tool allows you to migrate a publish/subscribe configuration that uses the
basic WebSphere MQ Publish/Subscribe broker to a more complex one that
takes advantage of the additional publish/subscribe functions available in
WebSphere MQ Event Broker, WebSphere MQ Integrator Broker, or WebSphere
MQ Integrator. It allows you to migrate in a step-by-step fashion. Applications
written using the MA0C SupportPac publish/subscribe functions can run
unchanged on WebSphere MQ Event Broker.
4.3 Case 1
Case 1 discusses the situation where you migrate from Embedded Messaging to
WebSphere MQ. You might find it useful to start using WebSphere Application
Server Embedded Messaging for messaging services and resources for
WebSphere enterprise applications, and then migrate to using WebSphere MQ.
These could be:
When you are setting up a test environment for experimenting with messaging
facilities from WebSphere Application Server.
Embedded Messaging services are automatically installed as part of the
WebSphere Application Server Version 5 installation. You can use Embedded
Messaging as your JMS provider to start experimenting with messages being
sent to or from an application using JMS.
When you have a requirement to use features of WebSphere MQ that are not
available in the Embedded Messaging environment of WebSphere
Application Server.
As you develop messaging applications that are more complex, you may find
that you require features available only in WebSphere MQ, for example:
– MQ clustering
– Putting a message to a queue that forms part of a message flow in
WebSphere MQ Integrator or WebSphere MQ Integrator Broker
– Using the WebSphere MQ Event Broker
Chapter 4. Migration 39
resources that you are currently using for Embedded Messaging when you start
using WebSphere MQ as your JMS provider.
You can also use both Embedded Messaging and WebSphere MQ JMS as JMS
providers for WebSphere applications. This could be useful in a situation where
you run both point-to-point and publish/subscribe applications:
In your point-to-point applications, you can use suitable resources defined via
the embedded JMS provider, in addition to resources known to external
WebSphere MQ and recognized by WebSphere Application Server.
In your publish/subscribe applications you can use the appropriate topic
definitions defined via the embedded JMS provider, as well as WebSphere
MQ resources that are linked to WebSphere MQ Integrator Broker or
WebSphere MQ Event Broker, for example.
Refer to the relevant section in the WebSphere Application Server InfoCenter for
detailed instructions on how to define these resources.
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp
4.4 Case 2
Case 2 discusses the situation where you migrate from WebSphere MQ to
Embedded Messaging.
You may feel that you would prefer to migrate to using Embedded Messaging for
messaging services and resources for WebSphere enterprise applications after
using the full WebSphere MQ product. This could be when you are downsizing
from an environment using WebSphere MQ facilities to one that uses
WebSphere Application Server only.
You should be aware that you will lose a considerable degree of functionality
when migrating in this direction. Specifically, you will not be able to use
WebSphere MQ clustering, connect to external queue managers, or put
message onto a queue that can be further used as input to a node in a
4.5 Case 3
Case 3 discusses the situation where you migrate from using WebSphere
Application Server V4 with MQSeries V5.2 and a publish/subscribe capability to
WebSphere Application Server V5 with MQSeries V5.3.0.1 and MQ Event
Broker. This scenario assumes that you currently use WebSphere Application
Server V4 together with a publish/subscribe function within MQSeries V5.2 and
JMS messaging, and that you want to migrate to WebSphere Application Server
V5 using WebSphere MQ Event Broker on WebSphere MQ V5.3.0.1. Your
reasons for performing this migration might be:
You want to move to the latest version of WebSphere Application Server to
make use of new features.
You want to use stream queues in a WebSphere MQ cluster. (The broker
used with the MA0C publish/subscribe SupportPac on MQSeries V5.1 or V5.2
cannot handle stream queues that are part of an MQ cluster.)
You need to decide whether you want to run a single network of brokers, or one
where MQ publish/subscribe functions are handled separately and independently
from those of the WebSphere MQ Event Broker. It is important to remember that
you cannot use one queue manager to share broker functions for MQ
publish/subscribe and WebSphere MQ Event Broker.
Chapter 4. Migration 41
Once you have migrated WebSphere Application Server from V4 to V5, the
process you would follow is:
1. Install WebSphere MQ V5.3.0.1.
2. Install WebSphere MQ Event Broker.
3. Set up a separate queue manager to test publish/subscribe functions before
deciding on an integration policy.
4. Set up the WebSphere MQ JMS Provider in WebSphere Application Server to
communicate with the WebSphere MQ structure that underpins WebSphere
MQ Event Broker. For details of how to do this, see Chapter 13, “WebSphere
MQ Provider scenario” on page 315.
4.6 Case 4
Case 4 discusses the situation where you migrate from using WebSphere
Application Server V4 with MQSeries V5.2 and a publish/subscribe capability to
WebSphere Application Server V5 with MQSeries V5.2 and MQ Event Broker.
This scenario assumes that you currently use WebSphere Application Server V4
together with a publish/subscribe function within MQSeries V5.2, and that you
want to migrate to WebSphere Application Server V5 using WebSphere MQ
Event Broker, but you want to stay on MQSeries V5.2. Your reasons for
performing this migration might be:
You want to make use of WebSphere MQ Event Broker technology, but you
are not ready to move to WebSphere MQ V5.3.0.1.
You want to move to the latest version of WebSphere Application Server to
make use of new features.
The important difference in your environment will be that you are using a Generic
JMS Provider in WebSphere Application Server to handle messaging application
flows.
4.7 Case 5
Case 5 discusses the situation where you migrate from WebSphere Application
Server V5 with WebSphere JMS Provider to WebSphere Application Server V5
with an external WebSphere MQ infrastructure (either WebSphere MQ Event
Broker, WebSphere MQ Integrator Broker, or WebSphere MQ Integrator). These
4.7.1 Case 5a
Migrating to WebSphere MQ Event Broker has the following advantages:
Scalability - allowing you to connect multiple brokers in one or more
collectives
A GUI-based control center for setup and administration of message flows
Integration and interoperability using the Application Messaging Interface
(AMI) and the MQI (MQ Interface) for application development
Access to a high performance input node in a WebSphere MQ Event Broker
message flow
This node, known as the JMSIPInput node, makes use of a TCP/IP port for
listening for input messages to process and send to a publication node, rather
than using the WebSphere MQ transport infrastructure. It is ideally suited to
high volume, high-speed, nonpersistent publish/subscribe applications.
Access to the JMSIPOptimizedFlow node
This node has an internalized message flow, optimized for JMS publishing
and JMS subscribing.
4.7.2 Case 5b
Migrating to WebSphere MQ Integrator Broker has the following advantages:
Scalability - allowing you to connect multiple brokers in one or more
collectives
A GUI-based control center for setup and administration of message flows
Integration and interoperability using the Application Messaging Interface
(AMI) and the MQI (MQ Interface) for application development
Access to powerful options in complex message flows that allow you to
perform one or more of the following functions:
– Message transformation
– Message routing
– Database access or updates
– Filtering
Chapter 4. Migration 43
For publish/subscribe messaging WebSphere applications, you can use
resources defined via the Embedded Messaging JMS provider. Alternatively, you
can use WebSphere MQ resources defined to WebSphere Application Server
that are handled by a publish/subscribe broker in WebSphere MQ.
4.7.3 Case 5c
Migrating to WebSphere MQ Integrator has all the advantages of migrating to the
other members of the “broker” family already mentioned. In addition, you can
support messages defined using the New Era of Networks Formatter with flows
in WebSphere MQ Integrator V2.1.
4.8 Summary
In the preceding sections, we have discussed some of the more common
migrations possible. However, there are other combinations that could be
considered. You should consult the appropriate WebSphere MQ documentation
for a more detailed discussion of the benefits of each particular WebSphere MQ
product, and to determine which one provides the functionality required for your
business case.
Here, our purpose is to provide simplified designs to help you to understand how
the various components of WebSphere Application Server are used. A number of
important capabilities, such as communication between queue managers and
the availability of security services, depend on the visibility of these between
Java Virtual Machines (JVM). In particular, note that:
For WebSphere JMS Providers, the JMS Server resides inside the JVM.
Consequently it cannot be utilized from processes running in other JVMs and
for this reason queue managers are not shared. The name server as well as
administration tools are built-in as well. In a similar fashion, security is the
domain of the embedded security server and it also resides in the JVM. The
components of this configuration are summarized in Figure 5-1 on page 47
and Figure 5-2 on page 49.
WebSphere MQ JMS Providers place the queue manager outside the JVM.
Consequently these can be managed externally and can be shared. Naming
remains within the JVM. However, security responsibilities are shared
between JVM and the container. Because of this, the security server cannot
be used for SSL. The components for WebSphere MQ JMS Providers are
shown in Figure 5-3 on page 50.
Server1
Application Server JVM
JMX
namespace
Application connection Embedded JMS
factory Server
destination Broker
JMS client classes
Security
pub/sub Listener
authentication
messages
authorization
point-to-point
queue manager
full-function pub/sub
WebSphere MQ
JMS Server
Client Q2 listener2 App2
Q4 listener4 App4
Client
name space
Client Q5 q5QCF
Node A
Cell A
namespace
MQ admin tools
Application connection
factory
destination
JMS client classes
Broker
manage
point-to-point
queue manager
full-function pub/sub
WebSphere MQ
Note: We found that the sequence of installs worked best when we installed
WebSphere MQ first, followed by WebSphere Application Server.
Application
JNDI Namespace
Connection Factory
Destination
JNDI
Namespace
Connection Factory
Destination
Broker
Manage
Provider
admin tool
JMS Server
Broker
Cell WebSphere MQ
Here are some things to keep in mind when you use Network Deployment:
In Network Deployment you can mix and match message providers among
and between nodes and servers.
Once you enroll a workstation as a member of a cell, you can no longer use
the WebSphere Administrative Console on that machine. You can only use
the one on the node that controls the cell.
You can configure and control all the resources in the cell from the master.
If you configure your resources to have cell scope, all servers in the cell will
use them. Similarly if you assign resources by node, the servers of the node
have the same definition and so on.
Scope inheritance is from cell to node to server. While this is simple in
principle, it can become quite complicated. To keep it simple, especially with
respect to resource assignments, we recommend you proceed to assign
scope by:
– Cell, if and only if, all servers in the cell are the same
– Node if all servers on the node are the same (and only then)
– Server in all other cases
With a Network Deployment cluster, you get centralized installation of your
applications. You still have to prepare the nodes first so they run the message
providers you want on them.
WebSphere Application Server 5 clusters have nothing to do with WebSphere
MQ Queue Manager clusters.
Each node in a cluster continues to run its own JMS Server. You can have all
your applications use the same one and in this fashion share a a single queue
manager across nodes of a cell.
You can run multiple applications in a cell across nodes if you assign the
same node’s JMS Server to all instances of that application. JMS Servers in
the cell you are not using in this fashion can be stopped.
JMS
The Java Message Service API provides a complete set of messaging services
based on a common interface irrespective of the underlying message transport
technology. An application that implements these interfaces both complies with
and runs on any J2EE 1.3 compliant platform. It is unnecessary to have access
to the source code of an application in order to implement it, as long as you have
enough information to configure the messaging resources required. You need to
have the external names for these application resources:
Queue Connection Factories
Topic Connection Factories
Queue Destinations
Topic Destinations
JNDI
Java Message Service applications use administered objects to achieve code
independence between messaging providers. You can move your application
from one message provider to another without making any changes to your
source code if you follow the J2EE namespace conventions.
Tip: There are several ways you can examine the namespace in effect for any
server. Remember if you are using Network Deployment your namespace is
specific to the server or node or cell where you configured the resources. You
can:
1. Use the Administrative Console. Inspect the definitions by finding them in
the navigation menu under Resources. Remember to use the correct type
of provider.
2. Examine the underlying resource.xml files for your server instance.
3. Use the dumpnamespace command.
Example 5-1 Path to namespace for server1 on node ITSOJ1 and factory tag
<factories xmi:type="resources.jms.internalmessaging:WASQueueConnectionFactory"
xmi:id="WASQueueConnectionFactory_3" name="OrderEntryQcf"
jndiName="JMS/OrderEntryQcf" authMechanismPreference="BASIC_PASSWORD"
XAEnabled="true" node="ITSOJ1">
<connectionPool xmi:id="ConnectionPool_12" />
<mapping xmi:id="MappingModule_6" mappingConfigAlias="DefaultPrincipalMapping"
authDataAlias="" />
<sessionPool xmi:id="ConnectionPool_14" />
</factories>
Things to keep in mind as you work with JNDI to configure your Java Message
Service provider:
1. JMS Destination objects can be used to encapsulate vendor-specific
properties, without having to expose those properties to the application (if you
have to use one of the Generic JMS Providers).
2. The JMSAdmin tool is not used with WebSphere Application Server 5.0
unless you use an earlier version of MQSeries.
Container managed
With the base JMS/XA support, the J2EE application uses standard JMS calls to
process messages, including any responses or outbound messaging.
Responses can be handled by an enterprise bean acting as a sender bean, or
handled in the enterprise bean that receives the incoming messages. Optionally,
this process can use two-phase commit within the scope of a transaction. This
level of functionality for asynchronous messaging is called bean-managed
messaging, and gives an enterprise bean complete control over the messaging
infrastructure, for example for connection and session pool management. The
common container has no role in bean-managed messaging.
MDBs can handle messages read from JMS Destinations within the scope of a
transaction. If transaction handling is specified for a JMS Destination, the JMS
listener starts a global transaction before it reads any incoming message from
that destination. When the MDB processing has completed, the JMS listener
commits or rolls back the transaction (using JTA transaction control).
If you want to cache a subscriber (to wait to receive messages that arrived since
it was created), then use a durable subscriber (for which this restriction does not
apply). Do not cache non-durable subscribers.
5.5 Security
In this section, we take a look at some security issues related directly to
Embedded Messaging, specifically how to use SSL with Embedded Messaging
as discussed in Chapter 15, “WebSphere MQ and SSL scenario” on page 369.
Since a complete discussion of security principles is outside the scope of this
redbook, you may want to refer to the redbook IBM WebSphere V5.0 Security,
WebSphere Handbook Series, SG24-6573.
Of immediate interest here is the fact that JMS messages arriving at a listener
port have no client credentials associated with them. Incoming messages are
anonymous. It follows that security cannot be based on client credentials. In fact
no user ID or client session may exist (no user does exist for a SOAP message,
for example). Consequently you must establish your security in a manner that
anticipates this fact and still observes the three-properties rule if possible.
Important: To take effect, you must enable global security on your server. This
is done at deployment.
Some of the many possible configuration choices are illustrated in Figure 5-7.
HTTP MQIPT
proxy
MQIPT M QIPT
W AS 5 with
W ebSphere
MQ
MQIPT
MQIPT
Key:
MQSeries protocol
HTTP
Of particular interest is the fact that MQIPT can run without being hosted by a
WebSphere MQ queue manager. Consequently you can deploy it either on a
WebSphere Application Server node or on a separate machine.
When you configure MQIPT, you provide the routing parameters including:
Listener port (for messages coming into MQIPT)
Destination port (for messages going to your configured message provider).
In other words, this is your configured listener port on your WebSphere
Application Server 5 server.
Destination URL. This is the URL of your WebSphere Application Server
node.
Part 2 Example
scenarios
To date, the sales representatives have been calling in their orders that are
manually entered into a database. A number of applications are involved in the
collection and processing of orders. Typically these applications perform the
following tasks:
Create orders
Confirm orders
Fulfill orders
Append new orders to a data warehouse
Process information gathered in the data warehouse
Look for and process specific orders that match certain conditions, for
instance, orders that exceed a certain value
Prepare invoices
Handle payments
Track commissions owed to the sales representatives
The problem of Web enabling is a general one and encompasses all of the
applications the geographically dispersed employees of TZFORU need to use.
The preceding discussion outlines one situation where the problem exists.
However, the same problem may exist in other problem scenarios described
below and is discussed in the context of that scenario.
The problem at hand is the decoupling of the order entry application from the
database. First, an intermediate store needs to be created that the order entry
application populates. Second, a process we will refer to as the order reader
process needs to be created that transfers the orders from the intermediate store
to the database. This approach also allows for scheduling the loading of orders
to the database at a convenient time.
There is another application, called the logging application, that takes all
incoming orders and adds them to a data warehouse. The information thus
stored enables different kinds of analysis to make accurate market predictions.
At present, the orders are all stored in the database and all applications that
need to see the orders have to access them from the database. Again, if the
database is unavailable or too busy, these applications are affected. Also, the
number of applications accessing the database is higher, leading to increased
stress on the machines running the database.
Typically, the order reader process would maintain an intermediate store for
each destination application. For each application needing data that matched a
One problem in this scenario is the coupling between the database and the
fulfillment application. This can be solved by using the intermediate store solution
mentioned above. For each order entry that is ready for processing, the order
confirm application updates its status in the database and puts a fulfillment
request in the intermediate store.
A new problem that arises with the proposed decoupling is that either both the
steps listed above must complete successfully or neither one should succeed. If
the database update succeeds while the creation of the fulfillment request in the
intermediate store fails, an order has been effectively lost. On the other hand, if
the database update fails while the creation of the fulfillment request succeeds,
there is a possibility of the sales representative reconfirming the same order, thus
creating two fulfillment requests for the same order. Support for managing
transactions among multiple resources is needed to address this problem.
6.4.7 Summary
In conclusion, the issues to be addressed are the following:
Enabling the sales representatives access to applications over the Web
Decoupling between the various components involved in order to create a
flexible environment that is tolerant of failures
Reducing the number of applications that access the database by creating
filter components that can feed multiple destinations
Supporting the publish/subscribe model of sharing data between dynamic
sets of applications
Incorporating support for distributed transactions
Enabling communication with legacy applications
We describe common tasks that you will perform when using WebSphere Studio
Application Developer, WebSphere Application Server, and Embedded
Messaging.
10.We entered db2abmin as our control center user name and used the same
user name and password for all DB2 user name and password settings. Click
Next.
7. Accept the default settings for node and host names and click Next. See
Figure 7-6 on page 82.
8. Choose to run both WebSphere Application Server and the IBM HTTP Server
as services, and provide a user name and password. Click Next. See
Figure 7-7 on page 83.
Figure 7-10 on page 87 shows the logon window for the WebSphere
Administrative Console. As explained on this window, security is not enabled by
default so any user ID can be provided at logon. The user ID does not have to
exist, does not require a password, and does not need to be a user ID of a user in
the local user registry. It is only used to track user-specific changes to
configuration data.
Figure 7-11 on page 88 shows the main window for the WebSphere
Administrative Console, which will be displayed after you log on.
3. Ensure that the current scope is set to Server and click New. See Figure 7-13
on page 90.
4. Select DB2 JDBC Provider (XA) from the drop-down list of provider types
and click OK.
5. Enter a name and, optionally, a description for the new provider. Also, check
that the Classpath and the Implementation ClassName are correct for your
installation. See Figure 7-14 on page 91 and Figure 7-15 on page 92.
5. Specify properties for the Data source and click OK. In our example, we
accepted default values for most properties and provided values for the
following properties:
– Name: TZFORUXA
6. Select the link for the new Data source as shown in Figure 7-17 and then
select Custom Properties from the Data source Additional Properties
section, as shown in Figure 7-18 on page 96.
7. Figure 7-19 on page 97 shows the custom properties that can be set for a
Data source.
4. On the next window, we are asked whether we need to make any updates to
bindings and mappings in preparation for the install. See Figure 7-23 on
page 101 and Figure 7-24 on page 102 for details. Review the default values
and click Next.
The default settings shown in Figure 7-23 are acceptable for our EAR file.
These are:
– Do not specify unique prefix for beans
– Do not override existing bindings
– Do not default bindings for EJB 1.1 CMPs
The default settings shown in Figure 7-24 are acceptable for our EAR file.
These are:
– Do not default connection factory bindings.
– Default virtual host name for web modules. This is set to default-host.
6. The pane Step 2: Provide Listener Ports for Messaging Beans, as shown in
Figure 7-26 on page 105, is displayed. In our example, we have already
created listener ports for all our messaging beans so the names provided in
the EAR can be accepted and we click Next to continue. Refer to 7.5.3,
“Listener ports” on page 120 for information on how to create listener ports.
7. The pane Step 3: Provide JNDI Names for Beans, as shown in Figure 7-27 on
page 106, is displayed. We accept the values from our EAR and click Next.
8. The pane Step 4: Provide default data source mapping for modules
containing 2.0 entity beans is displayed. We have one 2.0 EJB called
A270BaseOrderEtryEJB in our example EAR file and this is associated with a
Data source that has the JNDI name of jdbc/TZFORUXA. We have previously
Figure 7-31 on page 110 shows the mappings to javax.jms.Topic that exist in our
example EAR.
16.Figure 7-34 on page 113 shows the results of the application installation.
Click Save to Master Configuration.
5. Click New and provide properties for the Queue Connection Factory.
Figure 7-36 shows an example of a QCF definition.
This is used to configure the WebSphere Internal JMS Server that is used by
Embedded Messaging.
Key points:
When WebSphere Application Server is first installed, this component has its
initial state set to Stopped. You must change this to Started. If you do not
change this, when the WebSphere Application Server starts it will be unable
to create the internal queue manager.
2. Configure the JMS Server setting in the client JAR for the point-to-point
message sample using the Application Client Resource Configuration Tool.
a. Open a command prompt.
b. Change to the directory <washome>\bin.
c. Enter the command:
clientConfig
d. When the tool starts, it asks for the file to be opened, in this case, find the
EAR file for the MDBSamples as shown in Figure 7-43.
i. Click OK. Then select File -> Save, then File -> Exit.
3. Run the sample shown in Example 7-3.
Got message:
JMS Message class: jms_text
JMSType: null
JMSDeliveryMode: 2
JMSExpiration: 0
JMSPriority: 4
JMSMessageID: ID:414d51205741535f4954534f505f7365364aac3d20000b01
JMSTimestamp: 1034705675375
JMSCorrelationID:ID:414d51205741535f4954534f505f7365364aac3d20000a01
JMSDestination: queue:///WQ_Sample.JMS.Q2
JMSReplyTo: null
JMSRedelivered: false
JMS_IBM_PutDate:20021015
JMSXAppID:Websphere MQ Client for Java
JMS_IBM_Format:MQSTR
JMS_IBM_PutApplType:28
JMS_IBM_MsgType:8
JMSXUserID:moore
JMS_IBM_PutTime:18143537
JMSXDeliveryCount:1
Send a message
Reply string equals original string
Closing Queue Receiver
Closing Queue Sender
Closing session
Closing connection
End of Sample
Example 7-4
C:\was\samples\bin\MessageDrivenBeans>RunPsClient "Publish a message"
IBM WebSphere Application Server, Release 5.0
J2EE Application Client Tool
Copyright IBM Corp., 1997-2002
WSCL0012I: Processing command line arguments.
WSCL0013I: Initializing the J2EE Application Client Environment.
WSCL0035I: Initialization of the J2EE Application Client Environment has
completed.
2. Provide a file name, select the desired markup language (HTML in our
example), and click Next. See Figure 7-51 on page 132 for an example.
3. The next window of the new HTML wizard allows you to change the encoding,
the document type and the content type of the new file. In our example the
default values were acceptable. On this window, you can also specify any
style sheets you wish your HTML file to use. Click Finish to create the new
file. See Figure 7-52 on page 133 for an example.
4. After the new HTML is created, the file is opened in the WebSphere Studio
Application Developer Page Designer as shown in Figure 7-53 on page 134.
3. Enter an enterprise application project name, choose the module projects and
names you require, and then click Finish. See Figure 7-56 on page 137 for
an example.
You can also open a new perspective by choosing Window -> Open
Perspective.
From the pop-up menu that lists commonly used perspectives, select a
perspective by name or click Other. See Figure 7-58 on page 139 for an
example.
The full list of available perspectives is shown in Figure 7-59 on page 140.
2. From the server configuration view, select Server Configurations -> New ->
Server Configuration as shown in Figure 7-61 on page 142.
4. If you have not previously created servers or create a server project, you may
be prompted to create a new server project called Servers. Click OK.
5. Choose an HTTP port number for the server configuration and click Finish.
6. From the server configuration view, select Server Configurations -> New ->
Server.
7. Enter a server name and choose a server type. We used a type of
WebSphere Version 5.0 Test Environment as shown in Figure 7-63 on
page 144.
8. Apply a server configuration to the new server by selecting the server, then
clicking Switch Configuration and choosing a configuration, as shown in
Figure 7-64 on page 145.
The sub-groups are discussed in greater detail in the following sections along
with the database schema used for the application.
8.1.2 Sub-group 1
Sub-group 1 consists of an HTML page, a controller servlet that passes incoming
requests to a command object for processing, and a JSP to display the results of
the processing. Each of these components is described briefly in the following
sections.
orderentry.html
This page supports the creation of a new order. Figure 8-2 illustrates this.
The page has three radio buttons that allow tailoring of the application behavior:
Order Entry Only
Triggers the components in sub-group 2 which then enter the order into the
database. The confirmed field of the record is set to “N”.
Order Entry and Log and High Value Messages
Triggers the components in both sub-groups 2 and 3. In addition to being
entered in the database, the order is written to a log queue and if it is of a high
value, it is also written to a high value queue.
Order Entry and Log and High Value Messages and Publish Order Topics
The components in sub-groups 2, 3, and 4 are triggered. In addition to the
actions for the preceding option, a high value order is published to one of
three different topics, depending upon the product being ordered. All high
value orders for fashion items are published to a Fashion Bestseller Topic. All
high value orders for celebrity items are published to a Celebrity Bestseller
Topic. High value orders for all other items are published to a High Value
Topic.
OrderEntryServlet
This is the controller servlet for the application. For each request it receives from
a user, it performs the following steps:
1. Creates an instance of the OrderEntryCommandImpl class.
2. Validates and stores the request parameters in the OrderEntryCommandImpl
object. This includes the option chosen on the orderentry.html form that
identifies the scenarios or sub-groups to execute.
3. Creates an HTTP session for the request.
4. Invokes the execute method on the OrderEntryCommandImpl object that
causes the execution of the chosen scenarios. The results of the processing
are stored in the OrderEntryCommandImpl object.
5. Stores the OrderEntryCommandImpl object in the session and redirects the
request to the OrderEntryAcknowledged JSP, which then displays the results
of the processing to the user.
OrderEntryProducer
This is a Java helper class that is used by OrderEntryCommandImpl. There are
two methods in this class that are of interest: prepareJMSSender and
sendOrderEntry.
OrderEntryAcknowledged JSP
The JSP uses the OrderEntryCommandImpl object passed to it as part of the
session to retrieve information on the order just entered. From this information, it
creates an HTML page to be sent back as a result of processing the request.
8.1.3 Sub-group 2
Sub-group 2 consists of a message-driven bean that is triggered by an incoming
message containing an order and a helper class that persists the order to the
database using an entity bean. Each of these components is described in more
detail in the following sections.
OrderEntryConsumer
This is a helper class used by the OrderEntryMessageReceiver bean described
above. It has a single method named saveOrderEntry, which is passed the order
information and performs the following steps:
Looks up and creates the OrderEntry entity bean. The key used is the Order
Entry ID field.
Sets the various fields of the entity bean with data from the order information.
OrderEntry
This is the entity bean that represents order records in the database.
LogSender
This is a session bean that writes a log message containing both the header from
the original message as well as the order information to the LogOrderEntryQ. It
has a single method called sendOrderEntryLog, which is given an instance of
OrderEntryMessage as input. This method does the following:
1. Looks up the resource needed to establish communication with the JMS
provider.
2. Establishes communication with the JMS provider.
3. Looks up the LogOrderEntryQ queue.
4. Starts a transaction.
5. Sends the log message to LogOrderEntryQ.
6. Commits the transaction.
7. Terminates the communication established to the JMS provider.
HighValueSender
This is a session bean that writes a message containing order information to the
HighValueQ. It has a single method named sendHighValueOrder that performs
the following steps:
1. Looks up the resource needed to establish communication with the JMS
provider.
2. Establishes communication with the JMS provider.
3. Looks up the HighValueQ queue.
4. Starts a transaction.
5. Sends the order message to HighValueQ.
6. Commits the transaction.
7. Terminates the communication established to the JMS provider.
HighValuePublisher
This is a session bean that publishes an order to one of three topics depending
on the value of the SKU field in the order. It has a single method named
publishHighValueOrder that is passed the order information and performs the
following steps:
1. Looks up the resource needed to establish communications with the JMS
provider.
2. Establishes communication with the JMS provider.
3. Starts a transaction.
4. If the SKU for the order starts with the character “F”, it looks up the topic
named HighValueFashionTopic.
5. If the SKU for the order starts with the character “C”, it looks up the topic
named HighValueCelebrityTopic.
6. Otherwise, it looks up the topic named HighValueTopic.
7. Publishes the order to the topic that was looked up.
8. Commits the publish.
9. Terminates the communication established with the JMS provider.
The components that perform the verification are illustrated in Figure 8-3.
HighValueMessageReceiver
This is a message-driven bean. As messages containing high value orders are
written into HighValueQ, they are delivered to this bean, which then writes the
order data into the WebSphere Application Server standard out logs.
subscription.html
This page supports the initiation of a check on one of the three topics for orders
with high values. The page is shown in Figure 8-4.
The page has three radio buttons, each of which allow the user to subscribe to
one of the three high-value topics. After selecting one of the three topics, click
See Subscriptions to display the orders published most recently to that topic.
BestSellersCommandImpl
This is a Java helper class that is used by the BestSellersServlet to perform a
check on the topic selected by the user. The main method in the class is
subscribe(), which performs the following steps:
1. Looks up the resource used to establish communications with the JMS
provider.
2. Establishes communication with the JMS provider.
3. Looks up a durable subscription to the topic.
4. Starts delivery of messages that are subscribed to.
5. Polls a few times for any messages and gathersany received messages.
6. Terminates the communications with the JMS provider.
ShowTopics JSP
This JSP uses the BestSellersCommandImpl object passed to it as part of the
session to build an HTML page. The generated page shows the results of the
check made on the topic chosen by the user. The JSP returns the generated
page in response to the request.
This completes the discussion on the components that allow verification of the
application behavior.
The downloaded file is an archive containing another file named Table.ddl that
can be used to create the needed tables in the database. To extract the file and
create the necessary tables, run the following in a DOS window:
cd c:\temp\orderentry
jar xvf A270BaseOrderEntry.ear
jar xvf A270BaseOrderEntryEJB.jar META-INF/Table.ddl
This creates the database tables needed to run the order entry application.
Click Apply in the upper-right pane. This displays the general properties of the
provider. Scroll to the bottom of the upper-right pane and click Apply again. The
window shown in Figure 8-7 on page 162 is displayed.
Click the Save link. In the new window that is displayed, click the Save link again.
The new configuration for WebSphere Application Server is now stored in the
master repository.
In our case, the file was located at C:\SQLLIB\java. The file is named db2java.zip.
Scroll to the bottom in the upper-right pane and click J2C Authentication Data
Entries. In the new window that is displayed, click New. In the next window that
is displayed, enter the needed information as shown in Figure 8-10 on page 165.
The user ID and password are that of a system user with full authority on the
TZFORU database instance. We chose “oealias” as our alias name. Click Apply,
then the Save link and then the Save link again in the next two windows.
Go back to the window that displays the properties for the TZFORUXA data
source. Scroll down till you see the Container-managed Authentication Alias
property. Using the pull-down, select the alias for the user ID entered above. In
our case, we used “oealias”. Figure 8-11 on page 166 illustrates this.
Click Apply and then select Save in the next two windows.
In the new window, click databaseName. The next window that is displayed is
shown in Figure 8-13 on page 168:
In the Value field, enter the name of the database for the order entry application.
In our case, it was “TZFORU”. Click Apply at the bottom of the window. Then
click the Save link in the next two windows. This completes the creation of the
data source for the order entry application. At this point, restart WebSphere
Application Server.
1 OrderEntryQcf JMS/OrderEntryQcf
2 HighValueQcf JMS/HighValueQcf
3 LogOrderEntryQcf JMS/LogOrderEntryQcf
Instructions for the creation of these entities are given in 7.5.1, “WebSphere JMS
Provider” on page 113. Make sure that the above Queue Connection Factories
are XA-enabled.
1 HighValueTcf JMS/HighValueTcf
Instructions for the creation of these entities are given in 7.5.1, “WebSphere JMS
Provider” on page 113.
When creating HighValueTcf, add a value for the Client ID so that durable
subscriptions can be made. Also make sure that the above topic connection
factory is XA-enabled.
Queues
The order entry application uses the following queues.
1 OrderEntryQ JMS/OrderEntryQ
2 HighValueQ JMS/HighValueQ
3 LogOrderEntryQ JMS/LogOrderEntryQ
Instructions for the creation of these entities are given in 7.5.1, “WebSphere JMS
Provider” on page 113.
Topics
The order entry application uses the topics shown in Table 8-5 on page 170.
Instructions for the creation of these entities are given in 7.5.1, “WebSphere JMS
Provider” on page 113.
Message listeners
The order entry application uses the following message listeners.
Instructions for the creation of these entities are given in 7.5.3, “Listener ports”
on page 120.
1 OrderEntryQ
2 LogOrderEntryQ
3 HighValueQ
After creating all the above JMS Server entities, save the configuration of
WebSphere Application Server in the master repository. Then restart WebSphere
Application Server.
Select the Local path radio button and in the text box below it, enter the path
name to the downloaded application file, A270BaseOrderEntry.ear. Then click
Next.
In this window, check both the Distribute Application and Deploy EJBs
options. Then click Next.
The window for step 2 is now displayed. Starting with this window and going onto
the window for step 10, simply accept the default settings by clicking Next. Each
window displays its step number. On the window for step 11, click Finish.
WebSphere Application Server takes a few seconds to install the application and
shows the status of the install in a new window. Figure 8-16 on page 173
illustrates this.
Click Save to Master Configuration. You are then prompted to save the
configuration in the master repository. Click Save. The application has been
deployed successfully. Restart WebSphere Application Server. Make sure that
the order entry application is shown as running on the WebSphere Administrative
Console.
This completes the discussion on the deployment of the order entry application.
Click the link Order Entry Scenario. This brings up the Order Entry window as
shown in Figure 8-18 on page 175. This will be used to input orders and trigger
scenarios.
To understand what the application does, look at the Order Entry window. It
supports the following choices:
1. Add the order to a database.
2. In addition to the above, the order is sent to a log queue and if the quantity of
the order exceeds 99, to a high value queue as well.
3. In addition to the two options above, for an order of high value:
a. If the SKU begins with “C”, the order is published to a celebrity topic.
b. If the SKU begins with “F”, the order is published to a fashion topic.
Therefore, the third option seems to be the most general scenario that
encompasses the other options. So we can use it to test all possible paths in the
application. To exercise the application, input data for an order that has a quantity
of 100 or more, select the third option, and click Place Order. A new window,
shown in Figure 8-19 on page 176, is displayed. Be sure to verify that updates
are being done in the database tables.
Click the Another Order link. which takes you back to the Order Entry window.
Enter a few more orders this way, each time entering a quantity of 100 or more
and selecting the third option. For the SKU field, use identifiers beginning with
“C” and “F” for a few of the orders.
It would be helpful to have access to the source code in the application file
A270BaseOrderEntry.ear. WebSphere Studio Application Developer could be
used. Otherwise, the application file could be expanded and a source editor of
your choice used to open the various source files mentioned in the following
sections.
The scenarios implemented by the order entry application are the basis for
choosing the code snippets to discuss here. Each of the scenarios, along with
the associated code, is presented in the following sections.
We first describe the code involved in placing the order on a queue. Then, in the
next section, we go over the retrieval of the message from the queue.
Look up the queue on which the message is to be put. This code is in the
setQ method and is shown in Example 8-7.
Establish a session using the connection obtained in the previous step. The
code is in the sendOrderEntry method:
session = conn.createQueueSession(isTransacted, Session.AUTO_ACKNOWLEDGE);
The first parameter indicates whether the session needs to have a
transactional context or not. In our case, we are requesting the session to be
transactional. The second parameter specifies how messages received using
this session are acknowledged. For transacted sessions, the process of
committing the transaction causes the acknowledgement to happen.
Therefore, for transacted sessions, the second argument is ignored.
A message sender object for the queue the message is to be sent to is then
created from the session created earlier. The message is then sent using this
sender object. The send is committed using the session object after which
both the session and connection are closed. The code is in the
sendOrderEntry method and shown in Example 8-10.
Extracts the attributes for the order. The code for this operation is in the
getOrderEntry method and is listed in Example 8-12. All the method
invocations on the inMsg object extract the order details from the incoming
message.
Extracts the header for the incoming message. The relevant code is in the
getOrderEntry method and is listed in Example 8-13. All the method
invocations on the inMsg object extract the header information from the
incoming message.
A message of type ObjectMessage can hold a Java object that implements the
serializable interface. The getObject method on this type needs to be cast to
return an object of the desired type.
We first describe the code that publishes a message to a topic. Then in the
following section we present the code that subscribes to a topic and retrieves
messages from the topic.
From the information for the order, decide which topic to publish the order to.
Look up the topic using the obtained context. The code for this step is shown
below:
valueTopic = (Topic) ctx.lookup( "java:comp/env/jms/HighValueTopic");
Create a TopicPublisher object using the TopicSession object created above
and using the topic that was looked up. Then create an instance of type
The publish is committed. The session and connection are both closed. The
code shown in Example 8-17 illustrates this.
Determine the name of the topic to subscribe to and then look it up using the
previously acquired context. The code in below illustrates this.
valueTopic = (Topic) ctx.lookup("java:comp/env/jms/HighValueFashionTopic");
Create a durable subscriber using the obtained session. This allows for the
subscriber to receive any messages that are published while it is subscribed
but inactive. Start delivery of messages by invoking the start method on the
connection. The code is shown in Example 8-19 on page 185.
Perform a timed receive. Handle any message that arrived. The following
code illustrates this:
Message msg = subscriber.receive(200);
Close the subscription and the connection. This keeps the subscription alive
and when the client re-subscribes all the messages delivered in the interim
will be delivered. The code is shown in Example 8-20.
You will only need to launch the Administrative Console to define your message
listeners. You can do this from within WebSphere Studio or from the command
line.
Proceed as follows:
1. Start WebSphere Application Server and import the
A270BaseOrderEntry-V7.ear file.
2. Create the project and name it anything you like; for example:
A270BaseOrderEntry-V7
3. Click Next.
4. The Import Defaults window appears. We need to prepare the A270Utils.jar
file so in the Import Defaults window, select Create new Java Project
defined as a utility JAR or Web library.
Figure 9-1 Create a new utility JAR for order entry application
5. Click Finish.
6. Your project appears and will have errors. Do not worry about these. They will
be cleared as we proceed. You should verify that you have the directories for
your project established properly. You project should appear as shown in
Figure 9-2 on page 190.
7. Address the errors. Switch the Navigator view to J2EE Navigator and right
click A270Util.
8. In the pull-down menu that appears, select Properties. The Properties
window appears.
9. Select Java Build Path.
10.Ensure the A270Utils/source check box is selected.
11.Click the the Libraries tab.
12.Click Add Variable. The New Variable classpath entry window appears.
13.In the Defined classpath variables list select WAS_50_PLUGINDIR -
C:\WebSphere Studio\runtimes\base_V5.
14.Click the Extend button.
15.A list of variable extensions appears. Select +lib.
16.A list of extensions appears. Scroll down and select j2ee.jar. If you do not find
the j2ee.jar file, you are using the wrong classpath variable.
At this point there should no longer be any errors in the Tasks window. If there
are, repeat the steps above until the errors are cleared.
Proceed as follows:
1. In the J2EE Navigator window, right-click A270BaseOrderEntryEJB and
select Run on Server in the pull-down menu.
2. The Server Selection window appears. Click the Create a new server radio
button and select server type from the list of servers. We selected Test
Environment.
3. Click Finish. A server named server1 is created. Server1 will throw a number
of exceptions trying to start because we have not assigned its Java Message
Service resources. Ignore them. Close the Web browser.
Note: We recommend that you get the value of the path variable and verify
the db2java.zip file (or its equivalent if you are not using DB2) is there.
Note: You define resources for message providers within one of three
scopes. We used Node scope in this example because it is the WebSphere
Application Server default. All three scope definitions are exposed in the
WebSphere JMS Provider Options window and you do have to take care to
use the right one. We recommend that you collapse the cell and node
scope sections of the form and use server scope for this exercise.
2. At the Node level, complete each of the resource lists. For each one, click
Add and complete the window. While the names obviously change each time,
Note: In cases where you can use DIRECT, you have to have
WebSphere MQ installed and configured. If you use DIRECT here,
WebSphere Studio Application Developer will try to start a default
queue manager with ‘ ‘ as its name. This will cause the resources to fail
to start (resource allocation exceptions) and also produce MQ RC
2058.
3. Complete the JMS Server Settings. These are found below the Node settings
(and above the Server settings tables). Click Add and enter the JMS Server
Queue values fromTable 8-7 on page 170.
4. Click File -> Save WebSphere V5.0 Test Environment to save your
changes.
If you cannot start the Administrative Console for some reason, go back and
make sure you have enabled the Admin Console (see page 192). Also check that
you have been able to start server1. Use the server Console view to check on
this.
Tip: At this point, error messages will appear in your server console in red.
These occur as you make changes to the configuration of the running JMS
Server. The actual error is shown in Example 9-1. This should disappear the
next time you recycle server1.
The XML files maintained by the Deployment Manager are stored in the config
directory, such as WAS_install\DeploymentManager\config, and below. As you
drill down in the file structure, you will see one directory for each node. Each
node will then have a specific subdirectory for each application server process,
so you can see the structure of the domain reflected in the file system.
The Deployment Manager communicates with the Node Agent by way of the
configured Discovery Address, a port and protocol dedicated to allowing
WebSphere Application Server processes to find each other.
When configuration changes are made, the Deployment Manager updates the
Node Agents in the domain at regular intervals; the default is 1 minute.
With the WebSphere Application Server Administrative Console, you do have the
option of running the node independently from the Deployment Manager, which
essentially cuts the node off from exchanging information with the domain. You
can also remove a node from the topology with the removeNode command line
utility.
The Location Service Daemon (LSD) runs in the Node Agent. The LSD has two
functions:
Return the Interoperable ORB Reference (IOR) to the calling application
Maintain the routing table for Enterprise JavaBean workload management
The question sometimes arises about running multiple nodes on one physical
box. There is code in the install process to inhibit installation to multiple locations
on one physical box. This is a legal (licensing) restriction, not a technical
restriction.
10.1.3 Cells
When you federate a node to the Deployment Manager, the administration
application is uninstalled because the changes needed will be done at the
Deployment Manager and not locally any more.
Tip: You can reinstall the Administrative.ear file, and once again handle local
administration, but the changes you make will be overwritten at the next
synchronization.
The administrative application that runs the Deployment Manager has some
function not available at the base server, including the ability to view the entire
domain topology. Select Environment and click Configure Cell, then click the
Local Topology tab. You can expand the tree view of the domain to see nodes,
servers, and clusters, and click these resources to navigate.
The Configuration tab allows you to set the cell discovery protocol and
parameters needed for the nodes to communicate with the Deployment Manager,
if for some reason the default protocol does not fit into your particular
environment.
10.1.4 Clusters
WebSphere Application Server Version 5 uses a passive template concept since:
Once a cluster member is created, no changes to the template are
propagated.
After installing applications, the binaries are copied to the nodes during
synchronization.
10.1.5 Scope
Resources, such as Queue Connection Factories, Queue Destinations, JDBC
drivers and data sources, can be configured in a distributed environment in the
same manner as in the base server. However, there is an additional
consideration called scope.
The scope of a resource relates to its visibility from the application server
perspective. If you configure a resource at the scope of an application server,
only that application server can use the resource. If you configure a resource at
the scope of a node, all application servers running on that node can access the
resource. If you configure a resource at the scope of a cell, all application servers
in the domain may access that resource.
The server scope has precedence over the node and cell scopes, and the node
scope has precedence over the cell scope. Objects are created at only one
scope, although they might be visible at more than one scope.
By default, the file transfer service is always configured and enabled at a Node
Agent, so you do not need to take additional steps to configure this service.
However, you might need to configure the file synchronization service.
The ports used for file transfer are defined in the Network Deployment server
configuration under its WebContainer HTTP transports.
This service runs in the Deployment Manager and Node Agents, and ensures
that configuration changes made to the cell repository are propagated to the
appropriate node repositories. The cell repository is the master repository and
configuration changes made to node repositories are not propagated up to the
cell. During a synchronization operation, a Node Agent checks with the
Deployment Manager to see if any configuration documents that apply to the
The default behavior is for each Node Agent to periodically run a synchronization
operation. You can configure the interval between operations or disable the
periodic behavior. You can also configure the synchronization service to
synchronize a node repository before starting a node on the server.
Figure 10-1 on page 203 shows Node A and Node B are in the same cell.
Each node that hosts applications using JMS must have at least the Embedded
Messaging client installed. If Node B only had the sender application installed,
you could install Embedded Messaging client only instead of the Embedded
Messaging server installation.
Only nodes hosting a JMS Server require the Embedded Messaging server
component installed. Since Node A is hosting the JMS Server for sender and
receiver applications on Node A and the sender application on Node B, the
Embedded Messaging server installation is required.
The capabilities described above for running Embedded Messaging inside the
WebSphere Studio Application Developer IDE also apply to running Embedded
Messaging outside the WebSphere Studio Application Developer IDE.
2. Click OK.
3. WebSphere Studio Application Developer appears. We do not need the
Welcome page, so you can close it.
4. Import the application into the new workspace. Click File -> Import -> EAR
file.
5. Click Next.
6. Either enter or locate the EAR file we need: A270EmployeeDetails.ear.
Note: Although the Navigator view for our project shows a Server
Configuration, this server is not configured for our purposes at this point.
You can close this view at this point or simply ignore it.
However you create your server, verify that in the WebSphere Studio Application
Developer Console you see the successful start notice: Server server1 open
for e-business.
Troubleshooting
We received the pop-up window shown in Figure 10-5 when WebSphere Studio
Application Developer attempted to start the WebSphere v5.0 Test Environment
server.
Complete the JMS queue resource definition using the following instructions:
1. Scroll down to the Server Settings section to complete the JMS Server
Properties table. These settings are in effect for the embedded JMS Server.
2. Click Add to add queue names.
3. The one-line window Add Queue Name appears.
4. For Name, enter EmployeeDetailsQ.
Note: The Queue Name on this pop-up window must match the Queue
Name specified in the JMS Queue Destinations. We have one queue,
EmployeeDetailsQ. Embedded Messaging creates the JMS resources for
you at server launch time. Consequently, the server instance needs to have
the names of the message queue resources at that time. If there are other
Queue Names in the list, leave them there since they used by other
applications.
5. Click OK.
Note: If you do not enable the Administration Client, you cannot use the
WebSphere Application Server Administrative Console for the
WebSphere Studio Application Developer test environment.
Note: The Internal JMS Servers pane should contain the queue name you
entered for EmployeeDetails. You can enter the queue names for your
applications in this pane. If the queue name is missing or incorrect, enter
the correct queue name. You must restart the server for the change to take
effect.
When you have made these changes, the Internal JMS Provider pane should
look similar to Figure 10-7.
If there are other entries in the Queue Names, leave them there since they
used by other applications.
4. Restart the application server, server1, using the WebSphere Studio
Application Developer console:
a. Click the Server tab in the Servers pane.
b. Right-click the server name, WebSphere v5.0 Test Environment, and
select Restart. The server status may indicate that the server should be
restarted and republished.
c. Wait until you have the “Server server1 open for e-business” message
in the WebSphere Studio Application Developer console window before
you proceed.
After all these conditions are corrected, you are ready to test the application.
10.3.7 Troubleshooting
The following sections cover the error conditions we found, together with a short
discussion of what caused them and how we corrected them.
Explanation: The application looked for a jndiName that does not exist.
Cause: When the Queue Connection Factory name was entered we forgot to
click Apply.
Correction: Go back to the Test Environment V5.0.
Cause: We had one of the JNDI assignments reversed and in effect were
mapping two names to the same resource. The name server simply rejected
the binding for the second one. (Three bindings instead of four appeared in
the Console log.)
Correction: We corrected the incorrect resource assignment.
This leading blank does not appear in the entry we made in the WebSphere
Container Provider form as shown in Figure 10-9 on page 217.
The blank only appears in the Edit form used to provide the parameters for the
resource.
Explanation: The application server, server1, was running, but the JMS
Server is not running. Remember they are separate! You can explicitly start
the JMS Server.
Correction: Verify that the JMS Server Initial State is set to Started and, if
necessary, change the Initial State setting. Then JMS Server will start when
you restart the application server, server1.
3. Provide the JNDI and queue names to the application server and to the JMS
Server. Queue names for sample applications shipped with WebSphere
Application Server may be present in the Configuration form queue names
text area.
4. Restart your application server.
5. Check for the bindings and ready (open for e-business) messages.
The details for each step are described in 10.5, “Application setup” on page 241.
7. Click Next to accept the defaults for node name, host name and cell name or
enter your values for these parameters.
Table 10-1 Node name, host name and cell name values
Parameter Value
8. Change the user ID if you do not want to use the logon user name, enter the
password for the user ID, and click Next to run WebSphere Application Server
as a service. If you do want to run the WebSphere Application Server as a
service, deselect Run WebSphere Application Server as a service.
9. Click Next to display a summary of options selected.
10.Click Next and wait for the installation to complete.
11.Deselect the checkbox for connecting to the Internet to register and click
Next.
12.Click Finish to end the installation process.
13.The WebSphere Application Server First Step is started at the end of the
installation process. We verified the installation as shown in Example 10-6.
Tip: You may want to create a backup of your WebSphere Application Server
installation before you proceed. We copied C:\WAS directory to
C:\wasNDbackup directory.
15.Check the installation logs for any errors. The installation problem
determination methodologies are similar to the methodologies for base
WebSphere Application Server. The logs provide a lot of information that is
extremely helpful if you are experiencing problems. Check the installation logs
for errors:
a. Check the installer log in the C:\was\logs\DeploymentManager directory.
b. If you installed Embedded Messaging, you should check the MQ install log
for Network Deployment installation in the C:\was\DeploymentManager
directory.
If there are no installation errors, you now have Network Deployment installed.
The installation wizard configures the product. It is not necessary to perform
further configuration at this time.
Example 10-10 shows the entire directory structure for the Deployment Manager.
2. Use the startManager command to start the Deployment Manager. Wait for
the confirmation message that the Deployment Manager has started
successfully.
Notice the port numbers used by default for the various services. We refer to
these port numbers in later sections of this chapter.
You can find more information about the cause of the error in the SystemOut.log
file in the C:\was\DeploymentManager\logs\dmgr directory.
Example 10-15 shows the error message if the port 9090 is in use.
The first two arguments are required. The default port number is 8879.
The following addNode options are available for the command and in the
Administrative Console:
-includeapps By default the addNode program does not carry over
applications from the stand-alone servers on the new node to
the cell. This option tells addNode to attempt to include
Use the InfoCenter for more information about the addNode options.
You run the addNode command on the node where the WebSphere Application
Server is installed and replace <deploymgr host> with the host name of the node
running the Deployment Manager.
We ran the addNode command on ITSOF1 and replaced <deploymgr host> with
localhost because the Deployment Manager is running on ITSOF1. We
specified the default deploymgr port, that is 8879. Example 10-16 shows the
output from adding ITSOF1 to the existing cell, ITSOF1Network, managed by the
Deployment Manager on localhost or ITSOF1.
We looked at the cell changes and the procedures are described in 10.4.13,
“Exploring the changes” on page 233.
Below are the instructions for adding a node using the Administrative Console:
1. Expand System Management and click Nodes.
2. Click Add Node.
3. Enter the network name of the node to be added to the cell in the Host field. A
WebSphere Application Server instance must be running on this machine
(node).
4. If you select the Include Applications check box to include applications from
this node, an attempt will be made to copy the applications installed on the
remote instance into the cell. Applications with the same name as
applications that currently exist in the cell will not be copied.
5. Click OK to start the add process.
The output from the remote node using the Administrative Console would be
similar to Example 10-16 on page 226.
The removeNode options are available for the command, but not from the
Administrative Console. Below is an example of such an option:
-force Cleans up the local node configuration regardless of whether
you can reach the Deployment Manager for cell repository
cleanup.
Use the InfoCenter for more information about the removeNode options.
The output from the removeNode command would be similar to Example 10-17 on
page 229.
Below are the instructions for removing a node using the Administrative Console:
1. Expand System Management and click Nodes.
2. Select the node to be removed.
3. Click Remove Node.
4. Click OK to start the remove process.
Example 10-17 shows the output when we used the Administrative Console to
remove a WebSphere Application Server node, ITSOB1, from a cell,
ITSOJ1Network.
The remove node actions are described in 10.4.6, “Remove node from a cell
using a command” on page 228.
The startNode options are available for the command, but not from the
Administrative Console. Below is an example of such an option:
-force Cleans up the local node configuration regardless of whether
you can reach the Deployment Manager for cell repository
cleanup.
Use the InfoCenter for more information about the startNode command options.
The stopNode options are available in for the command, but not from the
Administrative Console. Below is an example of such an option:
-nowait Tells the stopNode command not to wait for successful shutdown
of the Node Agent process.
Use the InfoCenter for more information about the stopNode command options.
The startManager options are available in for the command, but not from the
Administrative Console. Below is an example of such an option:
-trace Generates trace information into a file, using the startManager
utility, for debugging purposes.
Use the InfoCenter for more information about the startManager command
options.
The stopManager command reads the configuration file for the network
Deployment Manager process and sends a Java Management Extensions (JMX)
command to the manager telling it to shut down. By default, the stopManager
utility waits for the manager to complete shutdown before it returns control to the
command line.
The stopManager options are available in for the command, but not from the
Administrative Console. Below is an example of such an option:
-nowait Tells the stopManager command not to wait for successful
shutdown of the Deployment Manager process.
Use the InfoCenter for more information about the stopManager options.
Use the InfoCenter for more information about the command options.
3. You use the startServer command to start that the application server. The
application server must be running before you can use the Administrative
Console. Wait until you get a confirmation message that the server has
started before proceeding. Your process ID will be different from the one
shown in Example 10-18.
4. Using your favorite browser, enter the following URL to start the WebSphere
Application Server Administrative Console:
http://localhost:9090/admin
Figure 10-12 on page 235 shows the top level of the topology tree in the
left-hand column after you log on.
Notice that the cell name, ITSOF1Network, appears at the top of the topology
tree.
5. Use the following instructions to verify that the node, ITSOF1, was federated
to the cell:
a. Expand System Management and click Nodes.
b. You will see two nodes. Figure 10-14 on page 236 shows that one node is
the federated node, ITSOF1, and the other node is the Deployment
Manager node, ITSOF1Manager.
c. Click the federated node, ITSOF1, and then click the Local Topology tab.
d. Expand the federated node, ITSOF1, to see the resources, such as
servers.
e. Expand servers to see the server processes for the federated node,
ITSOF1. Figure 10-15 shows the Node Agent, ITSOF1, that manages the
processes in the node, the application server, server1, and the JMS
Server, called jmsserver.
These two applications are installed when you federated the node, ITSOF1.
The application adminconsole_ear provides the Administrative Console
support. The application filetransfer_ear provides the file transfer support.
e. Expand the nodes, ITSOF1Manager and ITSOF1, and expand servers
under each of the nodes. Figure 10-17 on page 238 shows the server
processes for each node.
The server dmgr is the Deployment Manager. The server jmsserver is the
JMS Server. The server ITSOF1 is the Node Agent for the node. The server
server1 is the application server on the node.
7. Use the following instructions to view the file synchronization service
parameters for the Node Agent on ITSOF1. The file synchronization service
keeps the files in sync on this node, ITSOF1.
a. Expand System Management and click Node Agents.
b. Click the Node Agent, ITSOF1, for this node in the Properties pane.
c. Scroll down to Additional Properties and click File Synchronization
Service.
d. Under General Properties, notice that the Startup parameter is checked
(start the service when the server starts), the Synchronization Interval
parameter is set to 1 (1 minute elapses between synchronizations), and
the Automatic synchronization parameter is checked (synchronize files
automatically after the designated synchronization interval).
You can view other services, such as File Transfer Service, ORB Service,
Administration Services, Custom Services, Diagnostic Trace Service, Process
Definition and End Points, for the Node Agent server.
4. Enter the values from Table 10-2 into the Create Application Server pane
under Step 1 - Select an application server template.
We did not make any changes to the application code, which demonstrates one
of the advantages of JMS when moving the code between WebSphere MQ and
Embedded Messaging.
In a Network Deployment installation, the JMS Server is basically the broker and
additionally manages the queue manager. JMS Server is a peer of the other
servers in a given node, and runs in its own JVM. In a Network Deployment
configuration, you only have one active JMS Server per node. The JMS Server
gets created for you and you only need to configure it. The JMS resources
defined in a JMS Server are accessible from anywhere in the cell.
You can have more than one JMS provider per node.
Naming clients typically use the Java Naming and Directory Interface (JNDI) to
perform naming operations. Naming clients can also use the Common Object
Request Broker Architecture (CORBA) CosNaming interface. Use these
interfaces to look up server application objects that are bound into the name
space and obtain references to them. Most Java developers use the JNDI
interface.
Note: The queue name specified here must match the display name for the
resource in the Queue Destination definition. For more information, refer to
“Add WebSphere Queue Destination” on page 246.
7. Ensure that the initial state (the execution state requested when the server is
first started) is Started. If the JMS Server is not started when you run
EmployeeDetails application, you will get a “Create Queue Connection
Failed” message.
8. Click OK.
9. Click Save.
10.Click Save on the Save to Master Configuration pane to update the master
repository with your changes.
11.The server needs to be restarted for these changes to take effect.
Note: Sometimes not all the defined Queue Connection Factory names are
listed. If you think you have defined Queue Connection Factory names that
are not in this list, click WebSphere JMS Provider and then WebSphere
Queue Connection Factories again. This behavior is in the WebSphere
Application Server Version 5 code and may not be in the code at general
availability.
You can enter an optional description for this resource. Node is the
WebSphere node name of the administrative node where the JMS Server
runs for this connection factory. Connections that are created by this factory
will connect to that JMS Server.
Note: We will change this Node parameter when we run this application in
a multiple-node cell. For the multiple-node cell configuration, we specified
the same Node value in the Queue Connection Factory specifications on
both nodes.
Important: The queue name must also be added to the list of queue names in
the configuration of the JMS Server(s) where the queue is to be hosted. For
more information, refer to “Add queue definition to WebSphere JMS Provider”
on page 244.
You can enter an optional description for this resource. Node is the
WebSphere node name of the administrative node where the JMS Server
runs for this connection factory. Connections that are created by this factory
will connect to that JMS Server.
6. Click OK to complete the create of the WebSphere Queue Destination.
7. You may want to save your configuration. Click Save at the top of the pane
and click Save on Save to Master Configuration pane to update the master
repository with your changes. The server needs to be restarted for these
changes to take effect.
Use the instructions for adding WebSphere Queue Connection Factory in “Add
WebSphere Queue Connection Factory” on page 245. Use the values in
Table 10-3 for the Queue Connection Factories.
Since we specified the same queue name for both EmployeeDetails and
EmployeeDetailsReply applications, these application components use the same
physical queue. These application components use different JNDI names.
Use the following URL for more information on the button choices that are
available on various pages of the Administrative Console, depending on which
product features you have enabled:
http://itsof1:9090/admin/secure/help_console.jsp
Note: This will only work when WebSphere Application Server security is
off.
Before proceeding, you must wait until you receive a message that WebSphere
Application Server has stopped successfully.
You must wait until you receive the started successfully message before
proceeding.
You can find more information on these applications in Chapter 13, “WebSphere
MQ Provider scenario” on page 315.
Replace the host name, itsof1, with either localhost, 127.0.0.1, or your host
name.
You can find more information on this application in Chapter 13, “WebSphere MQ
Provider scenario” on page 315.
Replace the host name, itsof1, with either localhost, 127.0.0.1, or your host
name.
You can find more information on this application in Chapter 13, “WebSphere MQ
Provider scenario” on page 315.
10.5.6 Troubleshooting
This section describes the errors we made during this project and what we did to
correct the situation.
This log information indicates that the application could not find
JMS/mq/EmployeeDetailsReplyQcf, the JNDI name for the
EmployeeDetailsReply Queue Connection Factory. The bindings for the JNDI
names are available in the SystemOut.log file during the start of the application
server. We looked at earlier entries in this log file and found the entries in
Example 10-21.
Our application should have four JNDI bindings. The binding for
JMS/mq/EmployeeDetailsReplyQcf is missing. We entered
JMS/mq/EmployeeDetailsQcf (we should have entered
JMS/mq/EmployeeDetailsReplyQcf) as the JNDI name for the reply Queue
Connection Factory pointing to EmployeeDetailsReplyQcf. Figure 10-22 on
page 252 shows the incorrect definitions for the Queue Connection Factories.
From the log in Example 10-21 on page 251, you can see that the first definition
is used because the binding of JMS/mq/EmployeeDetailsQcf was done to
EmployeeDetailsQcf, and not EmployeeDetailsReplyQcf.
We fixed this error by updating the Queue Names under General Properties for
JMS Server on that node. Expand Servers -> JMS Servers -> jmsserver. You
add the queue name, EmployeeDetailsQ, that matches the Queue Destination
You can get more information in “Add queue definition to WebSphere JMS
Provider” on page 244.
The reason for this error in our situation was that the HTTP port 9080 was not
available. We verified the cause by looking at the SystemOut.log file in the
C:\WAS\logs\server1 directory. We did not have an entry similar to the entry in
Example 10-23. The reason we did not get this message when we started the
application server, server1, is that there are no installed applications for this
server.
The reason for this error in our situation was that the snoop transaction was not
in an installed application for this server, server1. We verified the cause by using
the WebSphere Application Server Administrative Console; we selected
Applications -> Enterprise Applications to display the install applications and
WSSamplesGallery was not installed on this server. The snoop transaction is
We would not have deleted all the installed applications if we had used the
following command to add the node, ITSOF1, to the existing cell,
ITSFO1Network:
C:\WAS\bin\addnode localhost 8879 -includeapps
Use the InfoCenter for more information about the addNode options.
http://www-3.ibm.com/software/webservers/appserv/infocenter.html
Note: The data needed for each additional server is stored in several XML
files, and uses up to about 50 KB of disk space.
When you create a cluster, you make copies of an existing template. That
template will probably be an application server that you have configured. You are
offered the option of making that server a member of the cluster.
Note: You may want to keep that server available only as a template, because
the only way to remove a cluster member is to delete it. Keeping the original
server intact allows you to reuse that configuration to rebuild from.
You can choose whether to include an existing server in the cluster. You can
create an empty cluster and then add server members to it. To create an empty
cluster, do not include an existing server in this cluster. Or, you can create a
cluster based on an existing server member, then create and add additional
server members to the cluster.
For the new cluster member to be recognized, the HTTP server plug-in needs to
be regenerated. WebSphere Application Server can be set to automatically
regenerate the HTTP plug-in, but that option is not recommended. The default is
manual regeneration.
However, you can make any change you wish to a cluster member as an
application server.
If you change the routing options, remember to manually regenerate the plug-in
to the HTTP server, using the genplugincfg tool. You need not stop the HTTP
server because the changes will be loaded when the next ReloadInterval timer
expires.
Note: There is a feature that can be custom installed, that is, by configuring a
property setting that allows the servers to automatically regenerate the
plug-in. Since changes to the plug-in are expected to be few, this feature may
use clock cycles unnecessarily. We do not recommend using this feature.
You follow the same instructions for installing an enterprise applications as you
used to do the install in a non-cluster environment.
When you request that all members of a cluster start, the cluster state changes
to Partial.start and each server that is a member of that cluster launches, if it is
not already running. After all members of the cluster are running, the cluster state
becomes Running.
When the stop operation begins, the cluster state changes to Partial.stop. After
all servers stop, the cluster state becomes Stopped.
10.7 Terms
Below are some terms used with Network Deployment:
Vertical scaling
Vertical scaling refers to setting up multiple application servers on one
machine, usually by creating cluster members.
Horizontal scaling
Horizontal scaling exists when there are members of an application server
cluster on multiple physical machines. Having cluster members on several
machines lets a single application span the machines, yet still present a single
system image.
Clusters
Clusters are identical multiple application server copies. A cluster member is
one application server in a cluster. The configuration of each cluster member
is based upon the application server that you copied to create the cluster
member. You can create all cluster members on the same physical machine
or on different machines. Using cluster members can improve the
performance of a server, simplify its administration, and enable the use of
workload management.
Cells
Cells are arbitrary, logical groupings of one or more nodes in a WebSphere
Application Server distributed network. A cell is a configuration concept, a
way for administrators to logically associate nodes with one another.
A transaction has a starting point and an ending point. The initiation and
termination of a transaction is called transaction demarcation. Resources that
are acted on in a transaction are enlisted as participants in the transaction. In
between the start and the endpoints, all the changes made to the resources have
the above ACID properties. At the endpoint the transaction can commit, meaning
all the changes are made permanent or the transaction can roll back, meaning all
the changes are undone.
Application components are the clients for the transactional resources. They
use the transaction manager to create transaction contexts. A transaction
context associates an application with the operations it performs on
resources. Application components also use the transaction manager to
demarcate transactions, that is, to indicate when a transaction begins and
The setup of an MDB is quite different from that of a stand-alone JMS client that
performs asynchronous message handling. To manage MDBs, WebSphere
Application Server V5 provides a listener manager that manages a pool of
listener threads. One listener is allocated to each MDB that runs. The listener
performs the following steps on behalf of the MDB:
1. Creates pools of sessions and threads for incoming messages.
2. Creates a message or topic consumer using the connection factory and
queue or topic specified for the MDB at deployment time.
The developer of the MDB has to implement the onMessage method to handle
the incoming messages. In addition, methods such as ejbCreate and ejbRemove
can be used to populate and flush a cache of frequently used information such as
JMS connections or references to session or entity beans.
The main actors in the application are the application client, the OrderConfirm
MDB and the UpdateCustomer MDB. The numbered arrows show the steps in
the processing of a request in the order that they happen in time. The steps
performed by the application client, the OrderConfirm MDB, and the
UpdateCustomer MDB are described in the following sections.
The application needs some order records to exist in the database. These
records can be created by using the order entry application. The recommended
procedure is to get the order entry application running and to create some orders
in the database before running this application.
1 OrderConfirmCmtQcf JMS/OrderConfirmCmtQcf
2 OrderConfirmBmtQcf JMS/OrderConfirmBmtQcf
Queues
The two-phase commit application uses the Queue Destinations shown in
Table 11-2.
1 OrderToConfirmCmtQ JMS/OrderToConfirmCmtQ
2 OrderConfirmedCmtQ JMS/OrderConfirmedCmtQ
3 UpdateCustomerCmtQ JMS/UpdateCustomerCmtQ
4 OrderToConfirmBmtQ JMS/OrderToCOnfirmBmtQ
5 OrderConfirmedBmtQ JMS/OrderConfirmedBmtQ
6 CustomerUpdateBmtQ JMS/CustomerUpdateBmtQ
Instructions for the creation of these Queue Destinations are given in7.5.1,
“WebSphere JMS Provider” on page 113.
Message listeners
The order entry application uses the message listeners shown in Table 11-3.
Important: Be sure to set the Maximum retries for the Message Listener Port
to at least 1.
1 OrderToConfirmCmtQ
2 OrderConfirmedCmtQ
3 CustomerUpdateCmtQ
4 OrderToConfirmBmtQ
5 OrderConfirmedBmtQ
6 CustomerUpdateBmtQ
Instructions for the creation of server queues are given in 7.5.2, “Internal JMS
Server” on page 119.
After creating all the above JMS Server entities, save the configuration of
WebSphere Application Server in the master repository. Then restart WebSphere
Application Server V5.
The application client, upon startup, prompts the user for the ID of the order that
needs to be confirmed. After the user enters an ID, it allows the user the option to
cause a rollback. The Figure 11-4 illustrates this.
In the first interaction with the application client, a confirmation of the order with
an ID of 1 is requested along with the option to roll back. The request is sent to
the server. Since the rollback option is selected, the transaction is not completed
and no response is sent from the server side. If you forget to set the Maximum
retries to greater than 0 when you configure your Message Listener Port, no
retries will occur and you will not be able to proceed. The application client times
out on the message receive posted for the response and initiates the next
interaction. In this second interaction, a confirmation of the same order is
requested and the option to roll back is declined. The transaction now completes
on the server side and a response is sent back to the client. The client displays
the response received and in addition, forwards it to the CustomerUpdate MDB.
The orders that exist in the database can be viewed by starting a DB2 command
window and entering the following commands in it:
1. db2 connect to tzforu user <userid>
2. When prompted input the password for the user ID above
3. db2 select * from moore.orderentry
Figure 11-6 Logs for version of two-phase commit application with container-managed transactions
Note the two highlighted lines at the bottom of the screen. The first line results
from the first iteration of the application client that uses the rollback option. The
transaction is rolled back and the EJB container does not acknowledge the
incoming message as a result. The JMS provider therefore attempts a redelivery,
which is detected and the related message is discarded by the OrderConfirm
MDB.
The second line results from the second iteration of the application client, which
does not use the rollback option. The transaction completes successfully and the
application client receives a response from the OrderConfirm MDB, which it then
Figure 11-7 Logs for version of two-phase commit application with bean-managed transactions
All but the last line shows the output due to a rollback exception resulting from
the first iteration of the application client, which uses the rollback option. Unlike
the version with container-managed transactions, there is no attempt made by
the JMS provider to redeliver the message.
The last line results from the second iteration of the application client, which does
not use the rollback option. The transaction completes successfully and the
application client receives a response from the OrderConfirm MDB, which it then
forwards to the CustomerUpdate MDB. The CustomerUpdate MDB simply sends
the text of the message to the log file.
The Utilities class essentially contains two static methods that are of interest -
getQueueConnectionFactory and getQueue. These two methods are used to
look up and obtain references to Queue Connection Factories and queues
respectively. These two methods in turn use another static method of the class -
jndiLookup that performs the actual lookup. In addition, this method also caches
the Context used to perform the lookup. The code for this method is shown in
Example 11-3.
Example 11-3 jndiLookup method in the Utilities class for the application client
/*
** Holds the initial context for use in JNDI lookups. **
** */
private static InitialContext jndiContext = null;
/* **
** Creates an InitialContext object if none exists. **
** Then looks up the given name in the JNDI namespace **
** and returns the associated object.Throws an **
** exception if the lookup fails. **
** */
public static Object jndiLookup(String objName) throws Exception {
Object objRef = null;
if (jndiContext == null) {
try {
jndiContext = new InitialContext();
} catch (NamingException e) {
System.err.println(
"ERROR: Could not create JNDI API "
+ "context: "
+ e.toString());
throw e;
The TwoPCClient class performs the task of interacting with the OrderConfirm
and CustomerUpdate MDBs. The class has a static main method that performs
all the initialization in terms of looking up the Queue Connection Factory and
queues, connecting to the Queue Connection Factory, creating the session, and
instantiating the needed senders and receiver. The significant part of the code in
this method is the creation of the session and is shown in Example 11-4.
if (responseMessage == null) {
/** Response timed out. Check if rollback of transaction was **
** requested. **/
if (rollbackTrue)
System.out.println("Timed out due to rollback");
/** Rollback was not requested. Must be an error. Throw exception. **/
else {
throw new Exception(
"ERROR: getResponseAndForward timed out " + "on response.");
}
}
There are two methods of interest in the implementation. The ejbCreate method
demonstrates the caching of references to the various connection factories and
queues as well as the connection to the JMS provider and the home interface to
the entity bean used to interact with the database. Such caching reduces the
/** Cache the reference to the queue connection factory used to send
** response back. **/
Object objRef = initCtxt.lookup("JMS/OrderConfirmCmtQcf");
orderConfirmedQcf =
(QueueConnectionFactory) PortableRemoteObject.narrow(
objRef,
QueueConnectionFactory.class);
/** Cache the reference to the queue used to send responses back. **/
objRef = initCtxt.lookup("JMS/OrderConfirmedCmtQ");
orderConfirmedQ =
(Queue) PortableRemoteObject.narrow(objRef, Queue.class);
/** Cache the reference to the home for the entity bean used to
** perform database operations. **/
objRef = initCtxt.lookup("ejb/OrderEntryCmtHome");
orderentryHome =
(OrderEntryCmtHome) PortableRemoteObject.narrow(
objRef,
OrderEntryCmtHome.class);
} catch (Exception e) {
System.err.println("OrderConfirmCmt Error: " + e.toString());
}
}
The other method in the OrderConfirm MDB is the onMessage method. The code
for the method is shown in Example 11-8.
/* **
** Get id of order to be confirmed and flag indicating whether **
** simulation of a failure is needed or not. **
** */
String orderId = mapMsg.getString("OrderId");
boolean rollbackNeeded = mapMsg.getBoolean("Rollback");
/** Cache the reference to the home for the entity bean used to
** perform database operations. **/
// Object objRef = initCtxt.lookup("java:ejb/OrderEntryCmtLocalHome");
//Object objRef = initCtxt.lookup("ejb/OrderEntryCmtHome");
//orderentryHome =
// (OrderEntryCmtHome) PortableRemoteObject.narrow(
// objRef,
// OrderEntryCmtHome.class);
/** Locate the entity bean for the order that needs to be
** confirmed. **/
OrderEntryCmt orderEntry =
orderentryHome.findByPrimaryKey((orderId));
orderConfirmedQSess =
orderConfirmedQConn.createQueueSession(true, 0);
orderConfirmedQSndr =
The method is invoked by the container when a message intended for the MDB
arrives. The method first checks to see if the message was previously delivered
and if so discards the message after logging an informational message.
Otherwise, it retrieves the parameters from the incoming message, finds the
entity bean, updates it and sends a response to the application client that sent
the request. Finally, if a rollback was requested, the state of the transaction
initiated by the container is set to cause a rollback. Note that there is no explicit
demarcation of the transaction. The container takes care to start a transaction
before retrieving the incoming message and to commit or rollback the transaction
after the method ends.
QueueSession orderConfirmedQSess;
QueueSender orderConfirmedQSndr;
try {
/* **
** Obtain an object implementing the transaction demarcation **
** interface to use in starting and ending global transactions. **
** */
UserTransaction userTransaction =
getMessageDrivenContext().getUserTransaction();
/* **
** The delivery of the incoming message is not part of the **
** bean-managed transaction. Hence it should not be delivered **
** unless this method throws a RuntimeException. **
** The container is responsible for acknowledging the message. The **
** acknowledgement mode can be set either during development or **
** during application assembly to either AutoAcknowledge or **
** DupsOkAcknowledge. When developing we chose AutoAcknowlegde so **
** redelivery should not happen. **
** */
if (msg.getJMSRedelivered()) {
System.err.println(
"A270OrderConfirmBMT ERROR: message redelivered. Discarding.");
return;
}
/* **
** Get id of order to be confirmed and flag indicating whether **
** simulation of a failure is needed or not. **
** */
String orderId = mapMsg.getString("OrderId");
boolean rollbackNeeded = mapMsg.getBoolean("Rollback");
/** Cache the reference to the home for the entity bean used to
/** Locate the entity bean for the order that needs to be confirmed. **/
OrderEntryBmt orderEntry =
orderEntryHome.findByPrimaryKey(orderId);
/** Create the session and sender required to send a response. **/
orderConfirmedQSess =
orderConfirmedQConn.createQueueSession(true, 0);
orderConfirmedQSndr =
orderConfirmedQSess.createSender(orderConfirmedQ);
/**
The details for setup for the following specific products are included:
WebSphere MQ V5.3.0.1
This will include the necessary setup to include an XA coordination example
where WebSphere MQ is the two-phase commit coordinator.
WebSphere MQ Integrator Broker V2.1 with CSD 3
This will include the necessary database setup for use with the product. In the
scenarios later, instructions will be included to create a user database and
tables.
WebSphere MQ Event Broker V2.1
Since the WebSphere MQ Event Broker cannot reside on the same system as a
WebSphere MQ Integrator Broker installation, we define a second machine
environment to accommodate that. This second machine will represent the
processing done for legacy preparation.
The first machine, where we run the browser and publish information using the
WebSphere MQ Event Broker, will be called ITSOQ1. The second machine that
hosts the WebSphere MQ Integrator Broker is called ITSOM1.
2. We do not have any Windows 2000 domains and all of our security is local, so
select No as shown in Figure 12-2 on page 292.
Note: Do not take the Typical install option. This will leave you without the
required functions. You need to select Custom install as shown in Figure 12-4.
11.We select the Windows Client drop-down (where there is an “X”) and choose
Install this feature and all its subfeatures (if any).
12.Likewise select the Java Messaging drop-down. An example of the Java
Messaging drop-down selection is shown in Figure 12-7 on page 297. Once
all the features have been selected, click Next.
13.We see a window telling us that all is in readiness for installation. Click Install.
14.A prompt asks whether we have purchased enough license units; click Yes.
15.A status window with a progress bar is displayed until installation completes
and then we see a window that tells us the install is successful. An example of
this window is shown in Figure 12-8 on page 298. Click Finish.
16.A window shows that MQ preparation is about to begin; click Next. A progress
window is displayed.
17.Next, a window asking about network configuration is displayed. We indicate
that no domain controllers were running Windows 2000 and click Next.
Figure 12-9 on page 299 is an example of the network configuration question
and our response.
18.After a progress window shows that the configuration of MQ for our network is
progressing, we see a completion window that also prompts us to decide if we
want a default configuration. We do not do the default configuration and just
click Next. An example of this window is shown in Figure 12-10.
We have decided not to have any default queue managers on our systems.
Although this may seem to be more difficult, since we will always have to specify
the queue managers, we think it is best to always be sure we are working with
the queue manager we expect to be using. It is possible, in the future, that we
might have more than a single queue manager on these systems. So, we have
opted to never have default queue managers.
We have decided to use defaults for logging. This means our logs will be circular.
Of course, in a production environment, we might have reasons to choose linear
logging to enable media recovery.
In our scenario, we used the WebSphere MQ Services GUI to create our queue
managers. It is up to your installation if you choose to use this on the Windows
platform. The reason we chose to do so was that the command server and
listener were then automatically created and set up to automatically start,
5. Once this command completes, the queue manager is active and ready for
use. The listener and command server will automatically be created and
started.
Note: If you cannot find the Client Configuration Assistant in the IBM DB2 list,
you have not properly installed and you will need to redo the DB2 installation,
making sure you select all the offered items in the list during the install
preparation.
Note: If you click the Refresh button and nothing shows up, wait a little
longer and try again; the deploy can sometimes take a little time since it is
writing to DB2. If this deploy takes more than a minute, check the Windows
Event Viewer to see what has been reported (look in both the Application
and the System views).
18.Select File -> Exit. When prompted for a file name, use ITSOM and leave the
extension as .xml. Do not change the folder where it is to be saved.
4. Select Start -> Programs -> DB2 -> Client Configuration Assistant;
highlight each of the databases you just created and select Properties (you
must do them one at a time). Then check Register This Database as ODBC
and click OK. An example of this is shown in the next two figures.
Note: If you click the Refresh button and nothing shows up, wait a little
longer and try again; the deploy can sometimes take a little time since it is
writing to DB2. If this deploy takes more than a minute, check the Windows
Event Viewer to see what has been reported (look in both the Application
and the System views).
18.Select File -> Exit. When prompted for a file name, use ITSOQ and leave the
extension as .xml. Do not change the folder where it is to be saved.
19.Setup is now complete.
Currently, only the TZFORU Corporation offices in the states of New York,
California and Texas are interested in this information. The Human Resources
department expects other states to gradually want to be included and would like
to implement a solution where states can be easily added on to the distribution. A
decision is made to publish this information under a certain topic. As no
processing of the information is required at this point, WebSphere MQ Event
Broker is chosen to supply the publishing function. The messaging infrastructure
to support these two products will be WebSphere MQ V5.3.
The TZFORU office in New York, California, and Texas want to subscribe to this
information and update their own records within their local DB2 database. They
would like to modify the records of their existing employees and add new records
when they receive information on an employee for the first time. In addition to
database updates, they may want to do some further processing of the message,
so WebSphere MQ Integrator Broker V2.1 will be used to implement this solution.
A third-party payroll application will make use of the data within the message and
update its own system. Its external interface requires the data to be in a generic
XML format. WebSphere MQ Integrator Broker is able to transform the data
within the message into XML and place that message on a queue for the
third-party application to collect whenever it is run. Since this third-party
application runs on its own system with its own local queue manager, TZFORU
Corporation would also like to utilize WebSphere MQ distributed queuing
functionality to get the message from the queue manager local to the
WebSphere MQ Integrator Broker to the queue manager local to the third-party
application.
The above scenario can be represented by the diagram shown in Figure 13-1.
Servlet
Execution Group
Publisher
Reply Queue
Uses ITSOQ_QMGR
ITSOM1
WebSphere MQ Cluster
Msg
Execution Group
Cluster Queue
Reply Queue
Message Flow DB2
Uses ITSOM_QMGR
Note: The reply queue in the above diagram is defined as a local queue on
queue manager ITSOQ_QMGR and has been shared in the cluster. As a
result, it is subsequently available on queue manager ITSOM_QMGR.
We use a script file and line commands for defining these resources, because
the WebSphere MQ Explorer is occasionally inconsistent when displaying the
We use a script file and line commands for defining these resources, because
the WebSphere MQ Explorer is occasionally inconsistent when displaying the
contents of objects in a clustered environment. In addition, the script file can be
used to define the required resources on other WebSphere MQ platforms. The
following procedure sets up the WebSphere MQ environment on ITSOM1:
1. From a command line prompt, create a queue manager by entering:
crtmqm ITSOM_QMGR
Figure 13-2 on page 322 shows what our WebSphere MQ infrastructure looks
like after completing the two sets of instructions just discussed. (We also have
WebSphere MQ Event Broker set up on ITSOQ1 and WebSphere MQ Integrator
Broker set up on ITSOM1.)
CHANNEL
CHANNEL
Cluster Receiver Channel: TO.ITSOM
ITSOM1
ITSOQ1
ITSOQ_QMGR
SERVER: server1
Application
A270EmployeeDetails
Namespace
PAYROLL.CONTROL.QUEUE
Connection Factory
EmployeeDetailsQcf
Queue Destination
EmployeeDetailsQ
NODE: ITSOQ1
CELL: ITSOQ1
If any of the additional properties have defaults, then we do not change these
values. The remainder of the properties on this page should be left blank.
There are no additional properties to configure. Once the above properties
have been entered, click Apply at the bottom of the page.
3. Select Resources -> WebSphere MQ JMS Provider again. This time, select
the link to WebSphere MQ Queue Destinations.
Once on the WebSphere MQ Queue Destinations page, click New to create a
new Queue Destination. This will take us to the configuration page where we
can enter the general properties. Table 13-3 specifies the properties and
values that need to be defined.
If any of the additional properties have defaults, then do not change these
values. The remainder of the properties on this page should be left blank. It
also should be mentioned at this point that the properties at the bottom of the
WebSphere MQ Queue Connection Properties page are left blank because
we are using bindings mode, not client mode, to connect to the local queue
manager. There are no additional properties to configure. Once the above
properties have been entered, click Apply at the bottom of the page.
The WebSphere MQ JMS Provider configuration has now been completed. The
configuration should be saved at this point by clicking the Save link at the top of
the page.
Repeat the above process for the second Queue Connection Factory,
EmployeeDetailsReplyQcf and for the second Queue Destination
EmployeeDetailsReplyQ. Table 13-4 and Table 13-5 on page 328 show the
values required.
The configured Queue Destinations look like Figure 13-6 on page 330.
Table 13-6 indicates the data type for each input value:
Gender String M or F
Once values have been entered against all the input fields, click Update
Employee and the application places the data on the queue
PAYROLL.CONTROL.QUEUE on queue manager ITSOQ_QMGR in the form of
a JMS Map message. If the application successfully puts this message on the
queue, the page shown in Figure 13-8 is displayed.
At this stage we have not implemented the flow within WebSphere MQ Event
Broker, so the message should still be sitting on the
PAYROLL.CONTROL.QUEUE. To ensure this process has worked correctly, we
get the message from the queue and examine its contents.
Note: An easy way to get the message from the queue and display its
contents is to use the supplied utility rfhutil.exe.
Note: Before importing, the Topics object on the Topics tab must be checked
out.
When the Designer tab is opened, we now see a message flow called
WMQEB_PAYROLL. If we click this message flow, we see that it consists of two
nodes. An MQInput node is connected to the local queue
PAYROLL.CONTROL.QUEUE and defaults the topic to
TZFORU/PERSONNEL/EMPLOYEE/STATUS. We are using an MQInput node
because we physically have to get the message from a message queue rather
than receiving the message directly via JMS. There is also a Publication node
that filters and transmits the output from the message flow to subscribers who
have registered an interest to the predefined topic. This Publication node must
always be an output node of a message flow and has no output terminals of its
own. An example of this message flow is displayed in Figure 13-11 on page 336.
Once access rights have been added, the Topics tab resembles the window
shown in Figure 13-12 on page 337.
Note: For Users and Groups to be available for selection under a Topics
properties, in our case they must be defined under our own operating
system’s users and groups. This may vary on different platforms. We must
also have a User Name Server for WebSphere MQ Event Broker to use. The
creation and configuration of a user name server is covered in the WebSphere
MQ Event Broker Installation Guide and is described as an additional process
after the initial installation.
To check that the execution group was deployed correctly, go to the Log tab and
refresh the view. Once deployed, the Operations tab looks like the window shown
in Figure 13-13 on page 338.
5. After making sure that the values are correct, click OK.
6. Once the Control Center is open, click the Message Flows tab.
At this stage the Control Center workspace looks like Figure 13-17.
10.Right-click the default execution group in the right-hand pane and select
Deploy -> Complete Assignments Configuration.
Note: There are long descriptions for each of the nodes in the message flows.
Read the long descriptions to find out more about what they are doing.
Table 13-7 Nodes and plumbing for the PAY_SIMPLE_JMSMAP message flow
PAYROLL_OUT MQOutput
PAYROLL_EXCEPT MQOutput
STATUS_TO_REQUESTER MQReply
ERROR_TO_REQUESTER MQReply
Table 13-8 shows how the different nodes in this message flow are plumbed
together.
Table 13-8 Nodes and plumbing for the PAY_SUB2 message flow
Node Name Node Output Connects to Node
Type Terminals
SEND_TO_CONTROL_QUEUE MQOutput
SUBSCRIBE_EXCEPT MQOutput
THROW_ERROR Throw
Note: We set the properties on the Basic tab of the MQOutput1 node to be:
Queue Manager Name: ITSOQ_QMGR
Queue Name: SYSTEM.BROKER.CONTROL.QUEUE
Make sure that you change the value of Queue Manager Name if you use a
different queue manager name.
After the WebSphere MQ Integrator Broker infrastructure has been set up, we will
register a subscription from ITSOM1 with the WebSphere MQ Event Broker on
ITSOQ1. We can do this by putting a test message on the PAY_SUBRQST input
queue by entering the following command from a command line prompt on
ITSOM1:
amqsput PAY_SUBRQST ITSOM_QMGR
The business case for this scenario is identical to the business case for the MQ
Provider scenario, except for the fact that TZFORU may already be in production
with an earlier version of MQSeries on system 1 (ITSOQ1) and may not be in a
position to upgrade to WebSphere MQ V5.3.1. For more information about the
business case, refer to 13.1, “Business case for this scenario” on page 316.
The Generic JMS Provider scenario is illustrated in Figure 14-1 on page 351.
The main difference is that queue manager ITSOQ_QMGR on ITSOQ1 is
running on MQSeries V5.2.1 instead of WebSphere MQ V5.3.1.
Servlet
Execution Group
Publisher
Reply Queue
Uses ITSOQ_QMGR
ITSOM1
WebSphere MQ Cluster
Msg
Execution Group
Cluster Queue
Reply Queue
Message Flow DB2
Uses ITSOM_QMGR
Note: The reply queue in the above illustration is defined as a local queue on
queue manager ITSOQ_QMGR and has been shared in the cluster. As a
result, it is subsequently available on queue manager ITSOM_QMGR.
Note: We assume that MQSeries V5.2.1 and the MA88 SupportPac are
already installed correctly on ITSOQ1 instead of the previously installed
WebSphere MQ V5.3.1. Refer to Chapter 13, “WebSphere MQ Provider
scenario” on page 315 for further details.
The installation of the MA88 SupportPac (MQSeries classes for Java and
MQSeries classes for JMS) will have installed an install_dir\java\bin directory,
which contains the JMS administration tool called JMSAdmin. By running this
administration tool, we can define our namespace.
The JMSAdmin tool requires a configuration file to run. By default, this file is
called the same name, JMSAdmin.config. In this file, we specify what provider we
want to use to create our namespace. A sample JMSAdmin.config file has also
been included in the additional material supplied with this redbook. For this
scenario, we decided to define our namespace in a file system. This is because
we wanted to make our namespace persistent, as opposed to the other types of
providers, which are nonpersistent. In this scenario, we found that the
WebSphere Application Server may need to be restarted and if a nonpersistent
provider was being used, we would lose our namespace at this point.
We have broken down this process into three steps to help alleviate any
problems using this tool. The steps are:
1. Configuring our environment
2. Running JMSAdmin
3. Creating our namespace objects
JMSAdmin.config
The JMSAdmin.config file must be in the same directory as the tool or in the
system path (it is usually kept in the same directory). We have supplied a sample
JMSAdmin.config in the additional material for this chapter. In the sample, we
have already defined the correct settings. There are three lines in this
configuration file that we need to consider here. These are:
The JMS provider
The URL address
The security setting
Note: This Provider URL address should be noted, since we later use this
exact same address when we configure the Generic JMS Provider within
WebSphere Application Server.
The contents for the setenv.bat batch file is shown in Example 14-1.
set CLASSPATH=%MQ%;%WebSphereCP%;%CLASSPATH%
set
PATH=%JAVA_HOME%;%MQ_JAVA_INSTALL_PATH%\lib;%MQ_JAVA_INSTALL_PATH%\bin;%PATH%;
If the location of the installed WebSphere Application Server, MQSeries, and the
MA88 SupportPac (MQSeries classes for Java) differ from those defined in the
above batch file, then these need to be modified. This batch file should be placed
in the same directory as JMSAdmin.
3. Run the JMSAdmin.bat batch file. If the tool successfully runs, a command
prompt is displayed, which indicates that the tool is ready to accept
administration commands. This prompt initially appears as:
InitCtx>
To exit the administration tool, enter the command end.
If this prompt does not successfully appear, JMSAdmin can be run in verbose
mode by using the -v parameter and can be run in trace mode by using the -t
parameter. We found that running the tool in trace mode provided the best
indication of any problems, which were usually classpath-related.
If the tool successfully creates the context and all of the objects, the resulting
output will resemble Example 14-3.
InitCtx>
InitCtx>
InitCtx/mq>
InitCtx/mq>
InitCtx/mq>
InitCtx/mq>
InitCtx/mq>
Stopping MQSeries classes for Java(tm) Message Service Administration
If for whatever reason we need to display, alter, or delete any entries in our
namespace, Table 14-2 on page 359 contains all the administration verbs that
can be used as commands when running the JMSAdmin tool.
ITSOQ_QMGR
SERVER: server1
Application
A270EmployeeDetails
PAYROLL.CONTROL.QUEUE
NODE: ITSOQ1
Queue Destination
EmployeeDetailsQ
CELL: ITSOQ1
Note: When installing WebSphere Application Server, the cell name and the
node name default to your computer name (ITSOQ1) and the server name
defaults to server1. These defaults are used in Figure 14-2.
Figure 14-3 Selecting Generic JMS Provider from the Administrative Console
2. Go to the bottom of the Generic JMS Providers Web page and select New to
create a new Generic JMS Provider. This takes us to the configuration page
for the provider.
3. Configure the general properties for the provider. Table 14-3 specifies the
properties and values that need to be defined.
Important: The configuration for the Generic JMS Provider is case sensitive.
Be careful to get the case correct. This applies to the general properties as
well as the Queue Connection Factories and the Queue Destinations.
Click Apply at the bottom of the General Properties page and save your
configuration.
4. Go back to the General Properties page for the Generic JMS Provider we
have just created. In the Additional Properties section at the bottom of the
page, select the JMS Connection Factories link.
Once on the Generic JMS Connection Factories page, click New to create a
new connection factory. This takes us to the configuration page where we
enter the general properties. Table 14-4 specifies the properties and values
that need to be defined.
The remainder of the properties on this page should be left blank. There are
no additional properties to configure. Once we have entered the above
properties, we click Apply at the bottom of the page.
5. Select Resources -> Generic JMS Provider -> mqContext again. This time,
select the JMS Destinations link.
Once on the Generic JMS Destinations page, click New to create a new JMS
Destination. This takes us to the configuration page where we can enter the
general properties. Table 14-5 specifies the properties and values that need
to be defined.
The remainder of the properties on this page should be left blank. There are
no additional properties to configure. Once we have entered the above
properties, we click Apply at the bottom of the page.
The Generic JMS Provider configuration has now been completed. The
configuration should be saved at this point by clicking the Save link at the top of
the page.
Repeat the above process for the second Queue Connection Factory,
EmployeeDetailsReplyQcf, and for the second Queue Destination,
EmployeeDetailsReplyQ. Table 14-6 and Table 14-7 on page 364 show the
values required.
When completed, the configured JMS Queue Connection Factories looks like
Figure 14-4 on page 365.
The configured Queue Destinations look like Figure 14-5 on page 366.
This scenario shows how we adapted our MQ Provider Scenario to make use of
the Secure Sockets Layer (SSL) protocol for messages flowing anywhere within
our application.
Introduction
Support for SSL was introduced in WebSphere MQ with Version 5.3. SSL is an
industry-standard protocol that allows you to secure the transport of message
data across an insecure network. It provides security in the areas of data
integrity, authentication and encryption.
Components of SSL
We will describe the components of SSL briefly. For more details please refer to
WebSphere MQ Security, SC34-6079, or to WebSphere MQ Security in an
Enterprise Environment, SG24-6814.
Certificates
A certificate is an digital entity that must be exchanged between two points of a
transmission for authentication purposes. It is composed of a key and various
other fields. These certificates may either be self-signed certificates (used for
testing purposes) or certificates purchased from and issued by a Certificate
Authority.
Encryption
Symmetric encryption is used when two partners each have access to the same
secret certificate key; the challenge is how to share that key in a secure way. .
Asymmetric encryption means that anyone using the public key of a certificate
can decrypt a message sent by the owner of the private key. Symmetric is
Hashing
This is a means whereby a number is produced representing the data being
transferred. The numbers at both ends of the transmission can be compared, and
if they do not agree it is likely that the message has been tampered with.
CipherSpecs
A CipherSpec is a combination of an encryption algorithm and a hash function. It
is specified on a channel level. Both ends of a channel definition need to specify
the same SSLCipherSpec value for a secure channel operation.
Message integrity
This is ensured by the combination of an encryption algorithm and a hashing
function.
There are many ways to generate self-signed certificates, including the IBM Key
Management Utility supplied with the IBM HTTP Server. (We installed the IBM
HTTP Server as part of our installation of WebSphere Application Server V5.)
However we used the OpenSSL tool, which is part of the Cygwin toolset, and
executed the following steps to generate a self-signed certificate.
6. Click Next and then select the Install from Internet radio button on the
following window.
7. Click Next and specify an appropriate directory for the download.
11.Click Next. When a list of packages from which you can select appears, click
+ Net Default line.
12.Scroll down in the expanded list and select openssl: The OpenSSL runtime
environment.
13.Make sure that the box in the Bin? column is checked, then click skip on this
line so that the beginning of this line now reads 0.9.6g-1 (or similar).
Once the download is complete, we are ready to use the tool to generate the
certificate.
This command generates the self-signed certificate using the private key.
After you issue the command you will be prompted for values for a number of
fields. You can enter any values you like, but you should remember the value
of the Common Name field, because this will be the name of the certificate
that WebSphere MQ will display.
4. Enter openssl pkcs12 -export -in cert.pam -out cert.p12 -inkey
cert.key -name “Test Certificate”.
Note: There are differences between operating systems in the way that you
add a certificate to a key repository and then assign a personal certificate to a
queue manager so that it can be used by a queue manager. Our example
shows SSL with Windows 2000. To the extent that other platforms differ from
Windows 2000, you should consult WebSphere MQ Security, SC34-6079.
Under Windows 2000, we can copy the certificate we have just created directly
into the queue manager’s certificate store.
Note: Under Windows NT, you need to perform this action in two steps - first
importing the certificate into the Windows store and then copying it to the
queue manager’s store.
4. Click Next. On the File to Import window, navigate to the same certificate
filename with the “.p12” suffix by using the Browse button.
5. Click Next. On the Password window, enter the password associated with the
private key. (This is the password entered on the window in Figure 15-8 on
page 378). Be sure to check Mark private key as exportable.
6. Click Next. On the Certificate Store window, select Place all certificates in
the following store and click Browse.
7. Select Trusted Root Certification Authorities from the pop-up window that
appears and click OK.
8. Click Next. You should see a window indicating that you have successfully
completed the Certificate Import wizard.
4. At the top of the next screen you should see the text Certificate assigned
to this queue manager: No certificate has been assigned. Click Add.
5. On the Add Certificate window, check Copy from another store.
6. From the drop-down menu next to Certificate Store, select ROOT.
7. Scroll through the Issued To list of certificates. Find and highlight the
certificate with the name that you assigned in Figure 15-7 on page 378.
We need to add the public key certificate of the ITSOM1 system to the queue
manager store on the ITSOQ1 machine, and to add the public key certificate of
the ITSOQ1 system to the queue manager store on the ITSOM1 machine. We
used the following procedure to achieve this:
1. Open a WebSphere MQ Explorer window and right click on the name of the
queue manager with which we want to associate the certificate. Make sure
that the queue manager to which the certificate will be assigned is running.
2. Using the WebSphere MQ Explorer right click on Queue Manager, select
Properties and click on Manage SSL Certificates
3. Select Properties from the drop-down menu and then select the SSL tab.
4. Click Manage SSL Certificates.
5. Click Add.
6. On the Add Certificate window, check Import from a file.
7. Click the Browse button and navigate to the public key certificate file to be
added to the queue manager store. (It is an X509 type certificate.)
Note: Remember that this is the public key certificate file that was copied from
ITSOQ1 to ITSOM1 (if you are working on ITSOM1), and it is the public key
certificate file that was copied from ITSOM1 to ITSOQ1 (if you are working on
ITSOQ1). You can check if this the correct file by double-clicking the cert.crt
file. You should see the details of the system that generated the certificate.
8. Click Open.
9. On the Manage SSL Certificates window, click Add.
10.The certificate should now be in the list for the queue manager store.
Note: The key file and trust file names and paths entered in the steps above
must exactly match the names and paths used when the files were created
using the OpenSSL keytool utility.
j. Click Apply at the bottom of the window and then click the Save link in the
Messages pane at the top of the screen.
k. When the Save to Master Configuration window appears, click Save.
2. Assign the new configuration to a port that is already defined to WebSphere
Application Server:
a. In the left-hand pane of the WebSphere Application Server Administrative
Console, select the Servers heading and the Application Servers link.
b. Click the server1 link and then scroll down in the Additional Properties
pane to Web Container.
e. Click the drop-down menu next to the SSL property and select the name of
the SSL configuration we created in step 1 on page 391.
f. Click Apply at the bottom of the window and then click the Save link in the
Messages pane at the top of the window.
g. When the Save to Master Configuration window appears, click Save.
Note: If the key file and trust file names do not match existing stores on your
server, you may have problems restarting WebSphere Application Server.
d. In the General Properties pane of the next window, enter * for the Host
Name and 4444 for the Port.
e. Click Apply at the bottom of the window and then the Save link in the
Messages pane at the top of the window.
f. When the Save to Master Configuration window appears, click Save.
Now that we have a new port number defined (4444) we can assign the SSL
configuration that we have already defined to this port. To do this, we follow step
2 in “Using an existing port on WebSphere Application Server” on page 391,
making sure to change port 9443 to port 4444.
Note: If the key file and trust file names do not match existing stores on your
server, you may have problems restarting WebSphere Application Server.
Trusted Trusted
Certificate Certificate
Certificate Store Certificate Store
Workstation
Figure 15-25 SSL implementation between WebSphere Application Server and WebSphere MQ
The implementation of this scenario can be divided into the following steps:
1. JMS namespace definition
2. Generic JMS Provider configuration
3. SSL configuration on ITSOS1
4. SSL configuration on ITSOQ1
The JMSAdmin tool requires a configuration file to run. By default, this file is
called the same name, JMSAdmin.config. In this file, we specify what provider
we want to use to create our namespace. A sample JMSAdmin.config file has
also been included in the additional material. For this scenario, we decided to
define our namespace in a file system. This is because we wanted to make our
namespace persistent as opposed to the other types of providers, which are
non-persistent. In this scenario, we found that the WebSphere Application Server
may need to be restarted and if a non-persistent provider was being used, we
would lose our namespace at this point.
We have broken down this process into three steps to help alleviate any
problems using this tool. The steps are:
1. Configuring our environment
2. Running JMSAdmin
3. Creating our namespace objects
Once we are able to run JMSAdmin, we can create all of our required
namespace objects. To do this, we are going to run the JMSAdmin tool in batch
mode. All the commands to create our namespace are supplied in a file called
EmployeeDetailsCtxSSL.txt, which can be found in the additional material for this
chapter. The commands create a context called mqSSL, create Queue
Connection Factories for EmployeeDetailsQcf and EmployeeDetailsReplyQcf,
There are a variety of different symmetric key encryption algorithms to use, and
also several hash functions. The combination of these two algorithms is known
as a CipherSpec and is negotiated as part of the handshake that creates a
secure session using SSL. There are a number of CipherSpecs that are available
to be used. We decided to always use TRIPLE_DES_SHU_US for this scenario
to lower the chance of a different CipherSpec being used at each end of the
connection (which will prevent the connection from being established).
To run JMSAdmin in batch mode with this input file, enter the following command:
JMSAdmin < EmployeeDetailsCtxSSL.txt
If the tool successfully creates the context and all of the objects, the resulting
output will resemble Example 15-2.
InitCtx/mqSSL>
InitCtx/mqSSL>
InitCtx/mqSSL>
Stopping Websphere MQ classes for Java(tm) Message Service Administration
The warnings in the resulting output only indicate that the tool is converting the
CipherSpec to its own version or representation of the one specified, which is
acceptable. A CipherSpec of TRIPLE_DES_SHU_US can still be defined at the
other end of the connection and handshaking will still take place.
At this point we have completed the JMS namespace definition and we can
proceed to the configuration of the Generic JMS Provider that will connect this
namespace the applications running in the WebSphere Application Server.
The configuration of the Generic JMS Provider is exactly the same as in the
Generic JMS Provider scenario, except for one alteration to the configuration. In
the above definition of our JMS namespace, we have defined our context as
mqSSL, while in the Generic JMS Provider scenario we defined our context as
mq. Therefore in the general properties for the Generic JMS Provider, we need to
define the External Provider URL as:
file:/C:/JNDI-Directory/mqSSL/
To create a private key and associated certificate in a Java key store, use the
following command:
keytool -genkey -alias clientcert -keystore keystore -keyalg RSA
where clientcert is the name of your private key, keystore is the name of the
store and RSA is the encryption algorithm to use.
Note: If the java_install\jre\bin directory is not in your path, the complete path
will be required when running keytool.exe. The key store should be created in
the location it will be used from and not copied there after it has been created.
Either run the above command in the required directory or fully qualify the path
to keystore.
The above command generates a key pair and wraps the public key into a
self-signed certificate. When entering the command, we will be prompted for a
key store password, which will be required when the key store is used. We will
also be prompted for the certificate’s Distinguished Name. It does not matter
what is entered at this point. Finally we will be asked if we want the same
password as the key store. We should answer Yes to this question.
The above command will create a file called clientcert.crt, which contains the
certificate for client authentication purposes. This file should be sent to ITSOQ1
so it can be added to the queue manager’s trusted store.
The cert.crt file is the public key certificate of the certificate previously created on
the ITSOQ1 system and assigned to queue manager ITSOQ_QMGR. The first
time this command is run, the system issues a prompt for a trust store password
and creates the trust store. The above command will import the cert.crt file into a
trust store called “truststore”. Remember the password for the next step.
3. Click the Process Definition link and then click the Java Virtual Machine
link in the Additional Properties pane on the window that follows.
4. On the next window, scroll down to Generic JVM arguments and insert the
following lines (without the bullets) into the pane next to Generic JVM
arguments:
– Djavax.net.ssl.trustStore=truststore
– Djavax.net.ssl.trustStorePassword=keystore
– Djavax.net.ssl.keyStore=keystore
– Djavax.net.ssl.keyStorePassword=keystore
Note: If you use the WebSphere MQ Explorer to define this channel, make
sure that you select Always authenticate parties initiating connections to
this channel definition on the SSL tab of the SVRCONN channel definition.
Part 3 Appendixes
Appendix A. WebSphere MQ
SupportPacs
This appendix describes the following WebSphere MQ SupportPacs used in this
IBM Redbook:
MA88: MQSeries classes for Java and Java Message Service
MA0C: MQSeries - Publish/Subscribe
Use of the MQSeries classes for Java Message Service offers benefits
associated with using an open standard to write MQ applications, such as the
protection of investment both in skills and application code. In addition the JMS
classes provide some additional features not present in the MQSeries classes for
Java. These extra features include:
Explicit support for publish and subscribe
Asynchronous message delivery
Message selectors
Structured message classes
Support for XA transactions via the XAResource interface (not available for
OS/390® or z/OS).
There can be more than one publisher for a particular topic, and subscribers can
receive publications on as many topics as they choose. Each MQ queue
manager can have one MQSeries Publish/Subscribe broker installed on it.
********************************************************************/
* */
* Definition for Cluster Receiver Channel TO.<system 2> */
* */
********************************************************************/
** Create a Cluster receiver channel
DEFINE CHANNEL(TO.<system 2>) +
* Receiver Channel
********************************************************************/
* */
* Definition for Cluster Sender Channel TO.<system 1> */
* */
********************************************************************/
** Create a Cluster Sender channel
DEFINE CHANNEL(TO.<system 1>) +
* Sender Channel
CHLTYPE(CLUSSDR) REPLACE +
* Description
DESCR('Cluster sender channel to ITSOQ_QMGR') +
* Cluster name
CLUSTER(ITSO_CLUSTER) +
* Transport Protocol
TRPTYPE(TCP) +
* Connection Name
CONNAME('<system 1>(1415)')
********************************************************************/
* */
* Definition for Local Queue PAYROLL.DEAD.LETTER.QUEUE */
* */
********************************************************************/
** Create a local queue
DEFINE QLOCAL('PAYROLL.DEAD.LETTER.QUEUE') REPLACE +
DESCR('Dead Letter Queue for this QM') +
* Persistent messages OK
DEFPSIST(YES)
********************************************************************/
* */
* Definition for Local Queue PAYROLL.NEWYORK.QUEUE */
* */
********************************************************************/
** Create a local queue
DEFINE QLOCAL('PAYROLL.NEWYORK.QUEUE') REPLACE +
********************************************************************/
* */
* Definition for Local Queue PAYROLL.CALIFORNIA.QUEUE */
* */
********************************************************************/
** Create a local queue
DEFINE QLOCAL('PAYROLL.CALIFORNIA.QUEUE') REPLACE +
DESCR('Output Queue from WMQI message flow to California state') +
* Cluster name
CLUSTER(ITSO_CLUSTER) +
* Persistent messages OK
DEFPSIST(YES)
********************************************************************/
* */
* Definition for Local Queue PAYROLL.TEXAS.QUEUE */
* */
********************************************************************/
** Create a local queue
DEFINE QLOCAL('PAYROLL.TEXAS.QUEUE') REPLACE +
DESCR('Output Queue from WMQI message flow to Texas state') +
* Cluster name
CLUSTER(ITSO_CLUSTER) +
* Persistent messages OK
DEFPSIST(YES)
********************************************************************/
* */
* Definition for Local Queue PAYROLL.EXCEPTION.QUEUE */
* */
********************************************************************/
** Create a local queue
DEFINE QLOCAL('PAYROLL.EXCEPTION.QUEUE') REPLACE +
DESCR('Exceptions generated by Payroll system') +
* Persistent messages OK
DEFPSIST(YES)
********************************************************************/
* */
* Definition for Local Queue PAYROLL.INPUT.QUEUE */
* */
********************************************************************/
** Create a local queue
********************************************************************/
* */
* Definition for Local Queue PAY_SUBRQST */
* */
********************************************************************/
** Create a local queue
DEFINE QLOCAL('PAY_SUBRQST') REPLACE +
DESCR('Input queue to trigger subscription registration') +
* Persistent messages OK
DEFPSIST(YES)
********************************************************************/
* */
* Definition for Local Queue PAY_SUBFAIL */
* */
********************************************************************/
** Create a local queue
DEFINE QLOCAL('PAY_SUBFAIL') REPLACE +
DESCR('Failure queue for trigger subscription registration') +
* Persistent messages OK
DEFPSIST(YES)
********************************************************************/
* */
* Definition for Local Queue PAY_SUBCATCH */
* */
********************************************************************/
** Create a local queue
DEFINE QLOCAL('PAY_SUBCATCH') REPLACE +
DESCR('Catch queue for trigger subscription registration') +
* Persistent messages OK
DEFPSIST(YES)
********************************************************************/
* */
* Definition for Local Queue BADQUEUE */
* */
********************************************************************/
** Create a local queue
DEFINE QLOCAL('BADQUEUE') REPLACE +
DESCR('Catch queue for bad msgs from JMS application') +
* Persistent messages OK
DEFPSIST(YES)
********************************************************************/
* */
* Definition for Cluster Receiver Channel TO.<system 1> */
* */
********************************************************************/
** Create a Cluster Receiver Channel
DEFINE CHANNEL(TO.<system 1>) +
* Receiver Channel
CHLTYPE(CLUSRCVR) REPLACE +
* Description
DESCR('Cluster Receiver Channel from ITSOM_QMGR') +
* Cluster name
CLUSTER(ITSO_CLUSTER) +
* Transport Protocol
TRPTYPE(TCP) +
* Connection Name
CONNAME('<system 1>(1415)')
Explanatory notes:
2 - Indicates that the JMS map will show a successful update status.
-- Enter SQL below this line. SQL above this line might be regenerated,
causing any modifications to be lost.
DECLARE H REFERENCE TO OutputRoot.MQMD;
SET H.ReplyToQ = 'PAYROLL.REPLY.QUEUE';
SET H.CorrelId = OutputRoot.MQMD.MsgId;
SET H.MsgId = MQMI_NONE;
SET H.MsgType = MQMT_REPLY;
DECLARE M REFERENCE TO InputBody.map;
SET OutputRoot.XML.EMPLOYEE_INFORMATION.NAME.FIRST_NAME = M.FirstName;
SET OutputRoot.XML.EMPLOYEE_INFORMATION.NAME.LAST_NAME = M.LastName;
SET OutputRoot.XML.EMPLOYEE_INFORMATION.STATE = M."State";
Explanatory notes:
2 - This line and the following 10 lines make provision for an error code to be
returned to the BADQUEUE in the event of a DB2 or SQL error.
Explanatory note:
1 - This completes the process started in the ESQL for the Compute2 node
described above.
Explanatory notes:
1 - This command adds an MQRFH2 header to the MQMD of the message for
the purposes of a publish/subscribe.
Note: If there are already arguments in this field, a space should be used as
the separator. Also note that case is important when entering this argument.
4. Click the Save link at the top of the Web page to save the configuration.
The Generic JVM Arguments field on the JVM properties Web page is shown in
Figure C-1 on page 429.
Trace specification
To configure the trace specifications, do the following:
1. Open the WebSphere Application Server Administrative Console, expand the
Servers folder, and click Application Servers. Select the predefined server,
which will probably be called “server1”.
2. Once the Configuration Properties for the server are displayed, go to the
Additional Properties at the bottom of the window and select Diagnostic
Trace Service.
3. Once the configuration properties for the Diagnostic Trace Service are
displayed, modify the Trace Specification field to include the following
arguments:
Messaging=all=enabled:JMSApi=all=enabled:
I
Note: If there are already arguments in this field, a colon should be used as
the separator. Also note that case is important when entering this argument.
These arguments can also be created by clicking the Modify button, but we
suggest that you copy the above argument directly into the input field.
4. In the section titled Trace Output, the File Name field can be modified to the
name and location of the trace file. An example of this field is as follows:
${SERVER_LOG_ROOT}/trace.log
The remainder of the fields on this configuration page do not need to be
modified.
5. Click the Save link at the top of the Web page to save the configuration.
Select the Additional materials and open the directory that corresponds with
the redbook form number, SG246878.
After unpacking the sample material you will find several directories and files
under each directory, these are all part of the sample application used in this
book. You can find further details about installing and configuring the sample
application in Part 2, “Example scenarios” on page 65.
The publications listed in this section are considered particularly suitable for a
more detailed discussion of the topics covered in this redbook.
IBM Redbooks
For information on ordering these publications, see “How to get IBM Redbooks”
on page 439.
IBM WebSphere V5.0 Security, WebSphere Handbook Series, SG24-6573
WebSphere MQ Security, SC34-6079
WebSphere MQ Security in an Enterprise Environment, SG24-6814
IBM WebSphere Application Server Version 5.0 Handbook, SG24-6195
Other resources
These publications are also relevant as further information sources:
Selecting the most appropriate JMS provider for your applications,
G325-2318-00, by Jamie Roots, June 2003; see:
http://www-1.ibm.com/support/docview.wss?uid=pub1e0f13e5870bf07b785256d8a00
24ad63
WebSphere MQ Queue Managers Clusters, SC34-6061
WebSphere MQ Intercommunications, SC34-6059-01
WebSphere MQ Event Broker Administration Guide, SC34-6093-01
WebSphere MQ Integrator Broker Administration Guide, SC34-6171
Implementing vendor-independent JMS solutions, written by Nicholas
Whithead in February 2002 and available from IBM developerWorks at:
http://www-106.ibm.com/developerworks/library/j-jmsvendor/
MQSeries V5.2 Using Java, SC34-5456-08
Index 443
G I
generic JMS connection factory 32 IBM Directory Server 27
Generic JMS Provider 8, 28, 31, 47, 243, 350 IBM GSKit 24
architecture 50 IBM High-Speed 100/16/4 Token-Ring PCI Manage-
configure 358, 402 ment Adapter 25
connection between WAS and MQ 398 IBM HTTP Server 24–25, 82, 372
inter-cell messaging 31 IBM Key Management Utility 372
JNDI aliases 31 IBM NetVista PC 25
properties 360 IBM Resource Recovery Services (RRS) 19
scenario 352 incorporating a node into a cell 223
SSL support 31 InfoCenter 226
generic JVM arguments 405 URL 40
configure 428 initial context factory 54, 361
genplugincfg 257 inMsg object 182
GET requests 34 install
getOrderEntry method 182 DB2 76
getQueue method 279 DB2 Administration Client 76
getQueueConnectionFactory method 279 DB2 Application Development Client 76
getResponseandForward method 281 DB2 Enterprise Edition 76
global transactions 266 enterprise archive file 241
two-phase commit 271 options for WebSphere Application Server 23
options for WebSphere MQ 23
options for WebSphere MQ Event Broker 23
H order entry application 171
HACMP 20
root installation directories 24
hardware used in our environment
two-phase commit application 274
IBM High-Speed 100/16/4 Token-Ring PCI Man-
WebSphere Application Server enterprise appli-
agement Adapter 25
cation 98
IBM NetVista PC 25
WebSphere Application Server Version 5.0 79
Hashing 372
WebSphere MQ Integrator Broker V2.1 304
high availability 32–33
WebSphere MQ V5.3.0.1 291
HighValueMessageReceiver bean 157
WebSphere Studio Application Developer 125
HighValuePublisher session bean 153, 155, 183
installation roots 24
HighValuePublisherBean.java 183
integral JMS provider
HighValueSender session bean 153–154, 182
Network Deployment between cells 33
HighValueSenderBean.java 182
Network Deployment with high availability 33
horizontal scaling 259
Network Deployment within a cell 32
host alias 395
Integrated Development Environment (IDE) 204
HTML
Integrator Broker 30
in WebSphere Studio Application Developer
interactive mode 400
130
inter-cell messaging 31
order entry application 151
Internal JMS Server 119, 212
sample scenario 150
internal queue manager 119
HTML Page Designer 133
Interoperable ORB Reference (IOR) 199
HTTP protocol 201
HTTP transport 393
HTTPS 59, 370, 391, 408 J
J2C authentication data 163
J2EE 25, 54
Index 445
L virtual hosts for Web modules 111
language environments 19 MBeans
Launchpad 292 create for Resources 103
LDAP service provider 432 message listener port 275
legacy applications 73 message listeners 170
lightweight (partial) J2EE environment 26 configure 194
Lightweight Directory Access Protocol 27 message sender object 181
Linux for z/OS 38 message systems
listener 265, 273, 303, 313 clusters 14
start command 320 comparison 13
listener manager 265 remote queue supported 14
listener ports 61 resource administrator 14
configuration 120 supported transport types 14
for messaging beans 105 message-driven beans 56, 265
properties 121 message-driven beans with bean-managed transac-
security 59 tions 267
listener, JMS 56 message-driven beans with container-managed
load balancing transactions 267
multiple brokers 21 messaging
local transaction 262 container-managed 28
Location Service Daemon (LSD) 199 testing 121
log analyzer 26 messaging beans
toolkit 26 listener ports 105
logging application 71 Microsoft Cluster Server 20
LogMessageReceiver bean 157 Microsoft Management Console (MMC) for Win-
LogOrderEntryQ 182 dows 10
LogSender session bean 153–154, 182 Microsoft Windows 2000 Professional, Service Pack
LogSenderBean.java 182 2 24
long-running transactions 56 migmqbrk migration tool 38
loose coupling 264 migration
from Embedded Messaging to WebSphere MQ
39
M from WAS V4 with MQ V5.2 to WAS V5 with MQ
MA0C 413
V5.2 and MQ Event Broker 42
MA88 28, 35, 62, 293, 349–350, 353, 400, 412
from WAS V4 with MQ V5.2 to WAS V5 with MQ
MapMessage 181
V5.3.0.1 and MQ Event Broker 41
mapping
from WAS V5 with WebSphere JMS Provider to
2.0 CMP beans 107
WAS V5 with external WebSphere MQ infra-
Data source 107
structure 42
EJB 107
from WebSphere MQ to Embedded Messaging
EJB references to beans 107
40
javax.jms.Queue 108
from WebSphere Studio Application Developer
javax.jms.QueueConnectionFactory 108
to WebSphere Application Server Version 5
javax.jms.Topic 109
218
modules to application servers 111
migmqbrk tool 38
preparing for install 101
scenarios 35
resources 108
to WebSphere MQ Event Broker 43
topic 110
modules
TopicConnectionFactory 111
mapping to application servers 111
Index 447
orderentry.html 151 Q
OrderEntryAcknowledged JSP 152 quality of service, transactional 27
OrderEntryCommandImpl 151–152 queue clustering 30, 32–33
OrderEntryConsumer 153 Queue Connection Factory 30, 40, 54, 114, 200,
OrderEntryController servlet 179 202, 205, 210, 272, 323, 356, 400, 402
OrderEntryMessage 153 add 245, 247
OrderEntryMessageReceiver 153, 179 definitions 210
OrderEntryMessageReceiverBean 181–183 establish connection to JMS provider 180
OrderEntryProducer 152 names 246
OrderEntryServlet 151 properties 116, 327, 361, 363
used in sample scenario 168
Queue Destination 9, 12, 30, 40, 54, 114, 118, 200,
P
persistence management, EJB 27 273, 323, 402
pluggable application client 26 add 247
point-to-point 48 create new 326
features 29 properties 328, 362
messaging 29 Queue Destinations 356, 401
port conflicts 188–189 queue manager 30–31, 34
port in use errors 208 clustering 19
prepareJMSSender method 152, 179–180 creating 320
private key certificate queue managers
create 403 creating 300
profiling tool 26
Programming Extensions 28 R
Activity Sessions 28 Redbooks Web site 439
Asynchronous Beans 28 Contact us xvi
Contained Managed Messaging 28 remote file services 201
Dynamic Access Intent 28 remote queuing 11
Dynamic Query Capabilities 28 removeNode command 199, 228
Scheduler 28 resource manager 263
Startup Beans 28 Resource Recovery Services 19
WebSphere Workflow 28 resource.xml 54
public key 398 restoreConfig command 233
public key certificate 389 return code 2058 194
Publication node 335 RippleStart 258
publish/subscribe 9, 13, 28, 72 rollback method 268
basic functions 37 rules 56
brokers 16 runmqlsr command 320
comparison 20 runmqsc command 10, 12, 18, 320, 390
durable 14
Embedded Messaging 11
features 29 S
sample scenario
Integrator Broker 18
application verification 155
persistent 13
application verification components 156, 184
sample 124
controller servlet 151
publishing to a topic 183
create order 174
database schema 149
database tables 159
Index 449
SupportPac MS81 62 U
switch configuration 145 UDDI Registry 27, 219
switch consultants 27 UDDI See Universal Description, Discovery, and In-
Sybase 19 tegration
symmetric encryption 371 unique prefix 101
symmetric key encryption algorithms 401 unit test environment 13
syncNode command 232 Universal Database Enterprise Edition 27
SystemOut.log 224–225, 241, 251–253 Universal Description, Discovery, and Integration
27
universal test client 192
T
TCP/IP 43, 412 UpdateCustomer message-driven bean 271
listener 307 usejdbc2 command 78
SSL connection 399 User Name Server 337
test environment 13
WebSphere Studio Application Developer 140 V
thin application clients 26 VeriSign 372
TimetoLive 57 vertical scaling 259
tooling support 204 virtual host name 102
toolkit virtual hosts
application profiling 26 mapping for Web modules 111
application server 26
debugger 26
workbench 26 W
Web Container 392
Topic Connection Factory 40, 54, 114, 116, 183
Web enabling in sample scenario 70
used in sample scenario 169
Web modules 102
Topic Destination 9, 12, 40, 54, 114, 118–119
mapping virtual hosts 111
TopicPublisher object 183
Web Services Gateway 27, 60, 219
TopicSession object 183
WebContainer 201
Trace node 347
WebSphere Administrative Console 8, 10, 12, 18,
trace specifications 429
40, 53–54, 86, 98, 116, 118, 160, 192, 194, 199,
tracing 29
212, 228
transacted sessions 180
support file 237
transaction
WebSphere Application Server
creating a new JMS session 268
Base option 25
distributed 262
Client Containers 16
local 262
Embedded Messaging 147
transaction demarcation 262
enterprise application installation 98
transaction manager 263
Express 25
TransactionStatus 344
installation options 104
trust file 394, 397
integration with WebSphere MQ family 315
trust file format 391
migrating from V4 with MQ V5.2 to V5 with MQ
trust store
V5.2 42
create 404
migrating from V4 with MQ V5.2 to V5 with MQ
Trusted Root Certification Authorities 382
V5.3.0.1 and MQ Event Broker 41
two-phase commit 56, 263, 268
migrating to external infrastructure 42
deployment 272
security 29
TX interface 264
SSL connection to WebSphere MQ 398
support for messaging and transactions 279
Index 451
test environment 140
workbench 129
weighting 257
WebSphere Servlet and Enterprise Java Bean
containers 26
Windows Event Viewer 314
Windows MQ Services 303
Windows XP 38
workload balancing 10
workload distribution
back-end servers 26
queue managers in a cluster 10
workload management 26, 199, 257
Edge Components 26
Workload Management Controller 26–27
WSAdmin tool 12, 197
WSSamplesGallery 253
X
X.509 format 379
X/Open Distributed Transaction Processing Model
263
X509 type certificate 389
XA 19, 57, 88
coordination with WebSphere Application Server
261
resources in a transaction 268
XA interface 264
XA-compliant DB2 JDBC provider
configuration 160
XA-compliant resources 268
XAResource interface 412
XML files 198
Z
z/OS
brokers 19
publish/subscribe in MA0C 38
XAResource not available 412
WebSphere Application
Server V5 and WebSphere
MQ Family Integration
Asynchronous This IBM Redbook will help you install, tailor and configure the
integration new Embedded Messaging function in WebSphere INTERNATIONAL
scenarios with Application Server V5. In addition, the IBM WebSphere MQ TECHNICAL
WebSphere products family products are reviewed and positioned with regard to SUPPORT
Embedded Messaging. ORGANIZATION
Discussing security
Part 1, “Exploring messaging options” is an introduction to
and transactionality
the different WebSphere products, including the WebSphere
Application Server and the WebSphere MQ product family. BUILDING TECHNICAL
Deployable sample This part also provides detailed instructions for preparing the INFORMATION BASED ON
application PRACTICAL EXPERIENCE
installation of these products for the scenarios described in
the book. You can also read about migration techniques when
using earlier versions of MQSeries. IBM Redbooks are developed by
the IBM International Technical
Part 2, “Example scenarios”, which is the vast majority of the Support Organization. Experts
book, covers the different integration scenarios using the from IBM, Customers and
Partners from around the world
WebSphere product family. These scenarios include create timely technical
WebSphere Application Server with embedded JMS information based on realistic
messaging, with external MQ and JMS messaging, and with scenarios. Specific
external generic messaging providers. Integration goes recommendations are provided
further than just product integration. It also includes samples to help you implement IT
solutions more effectively in
of using WebSphere MQ Integrator for integrating solutions. your environment.