How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

This section we briefly described WebLogic migratable jms server to support failover recovery and automatic migration using WebLogic Migratable targets. Some services such as JMS, JTA, and singleton objects are designed to run in only one active server instance in a cluster. These types of services are called Pinned Service. Pinned services cannot be deployed to multiple managed servers in a cluster. What happened if one of the deployed services in the server went down or failed? The solution is migratable targets. A migratable target is a special target which migrates the deployed service from one server to another server in a cluster automatically or manually in case any failure occurs.

Lets talk about messaging models in JMS. WebLogic supports two messaging models, Point to Point(Queue) and Publisher/Subscriber(Topic). Point to Point means one publisher and one subscriber and publisher/subscriber means one publisher and multiple subscribers. This section we are going to create a point to point model, that is QUEUE. Here we are going to create the following things in WebLogic server to support walk through about some of the objects in WebLogic which I briefed below

Migratable Target => It is a mechanism to migrate a service from one server in a cluster to another.

JMS Server => It is a container for resources JMS Queues & Connection factory in a JMS Module. The resource will be targeted to JMS server.

JMS Module => JMS resources such as Queues, Topics and Connection factory are stored here

Connection Factory => It is a resource in JMS Module. Clients use Connection factory to connect to JMS server

Queue => It is a resource in JMS Module. A Point to point model messaging service that is One publisher and one subscriber

SubDeployement => It is a resource grouping mechanism. The queue and ConnectionFactoy are grouped together as sub deployment and targeted to the JMSServer.

This is continuation of WebLogic Cluster setup, if you are interested in that material please click on the following links

WebLogic 12C installation

WebLogic Cluster setup

WebLogic Load Balancer Setup

WebLogic Session Replication

Assumption

The WebLogic instance we are going to setup JMS server has two managed server instances which are part of a cluster as shown below.

093016_0140_HowtosetupJ1 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

Below are the Migratable targets of the two managed servers in the cluster which are created automatically during the cluster creation. The migratable target is present under Environment >> Clusters as shown below

093016_0140_HowtosetupJ2 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

Let’s begin to setup the weblogic migratable jms server

Configure Migratable Target for JMS Server

Configure the Cluster Migration basis to Consensus

1. Login into WebLogic admin console. Default URL is http://localhost:7001/console

093016_0140_HowtosetupJ3 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

2. Navigate to Environment >> Clusters >> Click on the (ClusterName)

093016_0140_HowtosetupJ4 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

3. Click on the Migration tab >> change the Migration Basis to ‘Consensus‘ >> Click the button Save

093016_0140_HowtosetupJ5 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

Configure ‘Auto-Migrate Exactly-Once Services in one of the Migratable Target in the cluster

1. Navigate to Environment >> Clusters >> Migratable Targets >> Click on one of the link in Migratable Targets

093016_0140_HowtosetupJ6 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

2. Click on the Migration tab and change the Service Migration Policy to ‘Auto-Migrate Exactly-Once Services

093016_0140_HowtosetupJ7 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

3. In the Constrained Candidate Servers, Move the server(s) from the Available to Chosen list to support failure recovery. Click on the button Save

093016_0140_HowtosetupJ8 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

Create a JMS Server & Persistent Store

1. Navigate to Services >> Messaging >> JMS Servers >> Click on the button New

093016_0140_HowtosetupJ9 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

2. Input a Name and click the button Next

093016_0140_HowtosetupJ10 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

3. Click on the button Create a New Store

093016_0140_HowtosetupJ11 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

4. Select File Store and Click Next

093016_0140_HowtosetupJ12 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

5. Input a Name and specify a location. Click Next

Note: Make sure the location is available on the server and it has Read & Write access.

093016_0140_HowtosetupJ13 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

6. Select the new_managedServer_1 (Migratable) and Click Finish.

093016_0140_HowtosetupJ14 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

6. Choose the Filestore in the persistent store we just created above and click Next

093016_0140_HowtosetupJ15 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

7. Select the target we chosen earlier. Click Finish

093016_0140_HowtosetupJ16 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

8. You will see the above message in top of the screen

093016_0140_HowtosetupJ17 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

Create a JMS Modules

1. Navigate to JMS Modules >> Click New

093016_0140_HowtosetupJ18 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

2. Input a Name and click Next

093016_0140_HowtosetupJ19 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

3. Select the cluster and click Next

093016_0140_HowtosetupJ20 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

4. Select the checkbox Would you like to add resources to this JMS system module? and click Finish

093016_0140_HowtosetupJ21 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

5. You will see the below text on top of your screen

093016_0140_HowtosetupJ22 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

Create a JMS Connection Factory

1. Navigate to Environment >> Services >> Messaging>> JMS Modules >> Click on the module we created earlier

093016_0140_HowtosetupJ23 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

2. Click New

093016_0140_HowtosetupJ24 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

3. Select Connection Factory and Click Next

093016_0140_HowtosetupJ25 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

4. Input a Name and JNDI Name

093016_0140_HowtosetupJ26 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

5. Select the cluster and Click on the button Finish

093016_0140_HowtosetupJ27 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

Create a JMS Queue & SubDeployement

1. Navigate to JMS Modules >> Click on the module we just created

093016_0140_HowtosetupJ28 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

2. Click New

093016_0140_HowtosetupJ29 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

3. Select Queue and Click Next (You can choose Topic instead of queue here)

093016_0140_HowtosetupJ30 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

4. Input a name and JNDI name

093016_0140_HowtosetupJ31 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

5. Click on the button ‘Create a New Subdeployement

093016_0140_HowtosetupJ32 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

6. Input a name and click Ok

093016_0140_HowtosetupJ33 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

7. Select the JMS Server and Click Finish

093016_0140_HowtosetupJ34 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

8. You will see the below message on top of the screen

093016_0140_HowtosetupJ35 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

JMS JNDI Names

We have configured the JMS in WebLogic server and setup JMS Queue. User/Client can access the QUEUE by the below JNDI names we just created.

Queue: Jndi/JMSQueue

Connection Factory: jms/JMSConnectionFactory

Restart the servers

Restart all the managed servers in the cluster

093016_0140_HowtosetupJ36 How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)

 

In the next post, I will explain about how to prodese and consume JMS Messages in java class.

govindan How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)
Connect me

Govind

Thank you for visiting my personal blog. Myself Govindan, Software Developer by profession since 2006 and hence I started this blog early in 2016 and ever since I've been writing about technologies experienced and learnings of everyday life.

The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.

Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply 🙂
govindan How to setup JMS as a Migratable service with in a WebLogic Cluster (12C)
Connect me
Like us on Facebook.
Connect!