Ravish Mody

Actually JMS services are a singleton services and thus they are not active on all server in a cluster. In other words we can say that they are pinned to a single server in the cluster to preserve data consistency. However to ensure that singleton JMS services does not become a single point of failure for dependent applications in the cluster WebLogic Server provides a feature which can be configured to manually migrate them to any server instance in the migratable target list or also we can make it automated.

In this post we would be seeing how to configure a JMS services to migrate to the server which is running when the targeted server goes down and that too automatically with the help of consensus leasing using node manager.

Following are the steps:

1. Create two server “MS-1” and “MS-2” with the ports numbers 7003 and 7004
2. Put “MS-1” and “MS-2” in a cluster called “Cluster” and in a machine called “Machine

JMS_AM-1

3. Create 1 JMSServer called “JMS Server –1” and to “MS-1 (migratable)”

JMS_AM-2
4. Create a FileStore called “FileStore-1” and target to “MS-1(migratable)”

JMS_AM-3

5. Create a JMSModue called MySystemModule-1and target toCluster
6.
Create subdeployment called Sub_toMigrate and target to JMS Server –1”

JMS_AM-4

7. Create 1-queues called “Q” and 1-Connection factory called “CF” within the “MySystemModule-1” with advance targeting to the subdeployment “Sub_toMigrate

JMS_AM-5

8. Start both the servers “MS-1” and “MS-2”.
9.Check the jndi names in  the JDNI tree for both MS-1 and MS-2 and it should have “Q” and “CF” binded

JMS_AM-7JMS_AM-8

10. We would be using NodeManagers (Consensus) for clustered singleton services migration, hence we have to configure following things.

Console Path: Clusters —> Cluster —> Configuration [tab] —> Migration [sub-tab]
Candidate Machines For Migratable Servers: Machine
Migration Basis: Consensus

clip_image004

11.Under Environment go to the following path

Console Path: Migratable Targets –>  MS-1 (migratable) –> Configuration [tab] –> Migration [sub-tab].

Service Migration Policy: “Auto-Migrate Exactly-Once Services”

Constrained Candidate Servers: MS-1 and MS-2

JMS_AM-6

Test if Auto migration is correctly configured:

1. Restart all the servers. Make sure you start the MS-1 and MS-2 from console using NodeManager
2. The JNDI tree for both MS-1 and MS-2 show JMS resource(i.e. Q and CF) and JMS Server-1 is started.
3. When MS-1 is shutdown still the in JNDI tree of “MS-2” shows the JMS resources (i.e. Q and CF) that means Auto migration of JMS resources is configured properly.

Thanks,

Ravish Mody

If you enjoyed this post, please considerleaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.