Professional Documents
Culture Documents
Chapter 12. Service Integration Bus and High Availability Manager. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
12
Service Integration Bus and High
Availability Manager
If you add multiple clusters and application servers to a bus, the messaging engines
created within those members are interconnected seamlessly. Applications connected to
any of the messaging engines associated with a given SIBus can exchange messages
with each other without regard for which messaging engine theyre connected to.
In this chapter, youll extend the highly available cluster architecture you configured in
Chapter 11 by adding messaging engines with high-availability capability. Figure 12-1
shows the architecture youll achieve. Youll build this environment by creating an
SIBus and then adding the cluster as a member to the SIBus. This configuration consists
of a single messaging engine that can fail over to the messaging engine on the other
cluster member if required, making the messaging engine highly available.
337
Chapter 12. Service Integration Bus and High Availability Manager. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
CHAPTER 12: Service Integration Bus and High Availability Manager
Licensed by
Mahaboob Hussain
3845101
Figure 12-1: Highly available messaging engine architecture
Figure 12-2: SIBus and highly available messaging engine configuration overview
338
Chapter 12. Service Integration Bus and High Availability Manager. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
Configure a Highly Available Messaging Engine
To prepare the cluster environment, verify that the following processes are started:
Deployment Manager on dmgr-host
node agents on each cluster member node (was-host1 and was-host2)
339
Chapter 12. Service Integration Bus and High Availability Manager. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
CHAPTER 12: Service Integration Bus and High Availability Manager
Step 3. Next, under the Additional Properties section, click Bus members. Then
take the following steps to specify the cluster as a member to the bus:
a. Click Add.
b. Select the Cluster radio button (shown in Figure 12-5), and select the
cluster you created in the drop-down list.
c. Specify the data source you created and verified earlier (jdbc/sibus in this
example), and click Next.
d. On the confirmation page, click Finish.
e. Save the configuration.
Step 4. Restart the cluster to start the messaging engine on the cluster member. At
this point, a messaging engine will be created with the default configuration.
The messaging engine you created now is highly available.
340
Chapter 12. Service Integration Bus and High Availability Manager. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
Configure a Highly Available Messaging Engine
341
Chapter 12. Service Integration Bus and High Availability Manager. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
CHAPTER 12: Service Integration Bus and High Availability Manager
Step 7. To check the high-availability function of the messaging engine, stop the
server on which the messaging engine was initially started (server1 on
was-host1 in this case). Navigate to Servers|Application Servers to stop a
cluster member.
Step 8. Review the SystemOut.log file on was-host2 to see that the messaging
engine has been failed over and started on server2 on was-host2. The log file
shown in Figure 12-8 verifies the failover of the messaging engine.
342
Chapter 12. Service Integration Bus and High Availability Manager. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
Configure a Highly Available Messaging Engine
To set up this environment, complete the following steps to create a data store to store
the messages of a messaging engine on the second cluster.
1. Create a second database to persist the messages. In the example, we created a
second database (SIBDB2) on DB2.
2. Create the data source jdbc/sibus2, and verify the data-source database
connection.
3. Navigate to Service integration|Buses|yourbus|Bus members|yourmember, and
click the Add messaging engine button. Figure 12-10 shows this panel for the
HorizontalCluster member.
4. On the resulting panel (Figure 12-11), enter the name of the second data source
and the J2C authentication alias you created. Leave all other values at the
343
Chapter 12. Service Integration Bus and High Availability Manager. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
CHAPTER 12: Service Integration Bus and High Availability Manager
defaults. Make sure the Create tables check box is selected. Click OK, and save
the configuration.
5. Restart the cluster if its practical to do so. Otherwise, start the new messaging
engine on the cluster by navigating to Service integration|Buses|yourbus|
Messaging engines, selecting the new message engines check box, and clicking
Start.
6. Use the instructions you followed earlier to verify the configuration and failover.
344
Chapter 12. Service Integration Bus and High Availability Manager. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
High Availability Manager
To see the default core group, expand Servers, and navigate to Core groups|Core
group settings. Click DefaultCoreGroup and then Core group servers to view the list
of servers that belong to this core group in your configuration. (The list includes the
cluster members on which messaging engines are running.) Figure 12-12 shows this
display for the cluster in this chapters example.
Each HA Manager instance establishes connectivity with all other HA Manager instances
in the same core group using a dedicated transport channel. This behavior provides a
mechanism for an HA Manager instance to monitor the state of the other core group
members. Within the core group, the HA Managers negotiate to elect one HA Manager
to coordinate highly available services.
To determine the active coordinator in your configuration, review the SystemOut.log file
on each server process. In the sample configuration, the SystemOut.log file under the
<DMGR-ROOT>\logs\dmgr directory (shown in Figure 12-13) indicates that the HA
Manager instance on the Deployment Manager is the active coordinator in our case. (In
your configuration, you might find the active coordinator in a different process, such as
one of the cluster members or node agent processes.) Logging related to the HA
345
Chapter 12. Service Integration Bus and High Availability Manager. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
CHAPTER 12: Service Integration Bus and High Availability Manager
Manager function will be written to this log file as long as this instance acts as the active
coordinator. If the process that is holding the active coordinator (the Deployment
Manager process in our case) goes down for any reason, an HA Manager instance on
another process (one of the node agents or cluster members, for example) will be elected
as an active coordinator, making the HA Manager coordinator function highly available.
If you want to verify the HA Managers high-availability function, stop the process
in which the HA Manager instance is the active coordinator (the Deployment Manager in
our case). Review the SystemOut.log file for the remaining processes (node agents and
cluster members) to see which servers HA Manager instance is the active coordinator.
In the sample configuration, the SystemOut.log file under the <PROFILE-ROOT>\logs\
nodeagent directory on was-host1 indicates that the HA Manager instance on the node
agent is the active coordinator.
High-Availability Policies
Every core group has an associated collection of high-availability policies. Each
policy contains sets of directives governing the management of highly available
components. To examine the policies associated with the default core group, navigate
to Servers|Core groups|Core group settings|DefaultCoreGroup|Policies. Youll see a
policy called Default SIBus Policy (shown in Figure 12-14) that is used by all the
messaging engines (the match criteria of type=WSAF_SIB signifies all messaging
engines) with a One of N policy policy type, which means to keep a singleton running
on one server at any time. If a failure occurs, the HA Manager will start the singleton on
another server.
346
Chapter 12. Service Integration Bus and High Availability Manager. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
High Availability Manager
The default policy is sufficient for many purposes, and we recommend you dont change
it. If necessary, you can create and configure a specific policy by clicking New in the
policies window.
If you do want to change the default behavior of the SIBus policy, click Default SIBus
Policy in the policies list, and use the options under the Additional Properties section
and/or the General Properties section to change the default configuration. Options here
(shown in Figure 12-15) let you control which cluster servers the messaging engine can
run on (use the Preferred servers link to specify a list of servers in order of preference)
and configure the policy to control whether the messaging engine has a preference for a
particular server or set of server. You also have options to Fail back to the preferred
server whenever it resumes operation and to indicate that you want a service to run on
the Preferred servers only. (You should avoid being restrictive about which servers
can be chosen to run a service unless you have specific reasons for specifying preferred
servers. Its better to give the HA Managers the freedom to choose where a service
can run.)
347
Chapter 12. Service Integration Bus and High Availability Manager. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
CHAPTER 12: Service Integration Bus and High Availability Manager
For more information about the SIBus (and other SIBus topologies), the messaging
engine, and HA Manager topics, consult the WebSphere V6 Information Center
documentation (http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp).
For cluster members to perform recovery for each other, you must create the
transaction logs on a device that all the cluster members can access for example,
a network-attached storage (NAS) device. You also need to enable persistent service
for the cluster because this service isnt enabled by default after you create the cluster.
The flow chart in Figure 12-17 shows the steps required to enable and configure
persistent service.
348
Chapter 12. Service Integration Bus and High Availability Manager. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
Configure Highly Available Persistent Service
349
Chapter 12. Service Integration Bus and High Availability Manager. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
CHAPTER 12: Service Integration Bus and High Availability Manager
Step 4. After enabling the persistence service, restart the cluster. If you have trouble
starting a cluster member, review the SystemOut.log file of that member.
350
Chapter 12. Service Integration Bus and High Availability Manager. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
Configure Highly Available Persistent Service
351
Chapter 12. Service Integration Bus and High Availability Manager. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
Chapter 12. Service Integration Bus and High Availability Manager. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.