Showing posts with label mq series. Show all posts
Showing posts with label mq series. Show all posts

Wednesday, March 12, 2014

Weblogic Bridge for IBM MQ Series(Running on AS400 / iseries / Mainframe) Part 1


Bridges help in improving reliability of messages that need to be created on a remote Messaging Servers. If we have a program in weblogic writing to queues in MQ series, we write the messages into a JMS queue created in weblogic. Then, we create a bridge that takes care of sending the message from the local weblogic queue to MQ series. By doing this, We are immune to remote MQ going down. The bridge takes care of reconnecting and sending messages to the remote MQ.

In this part we will look at the pre requisites to setup a Weblogic Bridge for IBM MQ. We need a .bindings file which described JNDI lookups for weblogic to connect to the MQSeries (Websphere MQ)

1. Install MQ Series MQ Explorer on Windows.

2. Set up connection to Remote Queue Manager

a. Open MQ explorer and right click on queue managers and select “Add Remote Queue Manager”

image

b. give a queue manager name, select “Connect Directly” and click next



image

c. Give HostName, port number and Server Connection Channel. (The MQ administrator can give you these details) and click next

d. click next

e. give the user name and password if MQ is secure

f. click finish (Sometimes you might have to put in other information. Contact your MQ Administrator)
you should be able to see the Queue manager and expand queues and see the queues on the remote server.


3. Create an Initial Context

a. right click on JMS administered Objects and select “Add Initial Context”


image

b. Select File System, and give a valid Bindings Directory. Click Next.

image

c.Click Finish

image


4. Create Connection Factory

a. Expand the Initial context you just created,
right click on Connection Factory –> New –> Connection Factory.

image

b. Give a connection factory name( We use this name to configure connection factory in weblogic)

image

c. Select Queue Connection Factory and check supports XA transactions

image

d. Select MQ Client in transport and click Next. click next

image

e. select the appropriate version of the server

image

f. Select connection on left.
Select the queue manager
Give the appropriate url and port in connection list
click Finish.
image


5. Create a Destination


a. Right click on Destinations
Select new –> Destinations

image

b. Give a Destination Name(You will use the same name in Weblogic Destination Name)
Select Type and click Next.

image

c. Click Next.

d. Select the Queue Manager and the queue and click Finish.


image 


(Will continue tomorrow)

Saturday, December 15, 2012

Weblogic Bridge for IBM MQ Series(Running on AS400 / iseries / Mainframe) Part 2



6. Create Local Queues


You need to create local queues in weblogic
refer my previous posts on how to create local queues



Configure MQ series Bridge in weblogic





7. Install jms-xa-adp.rar in weblogic.


This is an XA adapter for weblogic and is required for guaranteed delivery. This comes along with weblogic installation and is available in server/lib directory. Install this as a .rar file and dont unzip this.
to deploy this go to weblogic console. domain - > deployments - > install.
clip_image002
select the jms-xa-adp.rar and on the choose target style. select "Install this deployment as an application" as shown above and continue the rest of the installation.
 
7. Create JMS Bridge destinations
 
You need to create a source and target destination. In our case local queues are source and  MQ series is remote





8. Create Source Destination

 
a.  Select JMS Bridge Destinations and click New
image
b. fill in the following details and click OK
Name: Source Bridge
Adapter JNDI Name: eis.jms.WLSConnectionFactoryJNDIXA
Classpath:
Connection URL: t3://localhost:7004,localhost:7003  (ignore the image)
*Connection Factory JNDI Name: jms/MYJMSCF  (from  step 5 – > d  http://rohith-oracle.blogspot.com/2012/10/creating-file-based-jms-queue-on_9.html)
*Destination JNDI Name: jms/MYDISTQUEUE       (Local distributed Queue JNDI  given when creating a file based jndi as in step 6 – > d  http://rohith-oracle.blogspot.com/2012/10/creating-file-based-jms-queue-on_9.html )
Destination Type: QUEUE
 
image
 

9. Create a Target Destination

a.  Select JMS Bridge Destinations and click New
image


b.  Enter the following details and click OK
*Name:  TargetBridgeDestination
Adapter JNDI Name: eis.jms.WLSConnectionFactoryJNDIXA
Adapter Classpath:
Connection URL: file:/C:/jmsbindings/    (As given when creating initial context in Step 3 –> b)
Initial Context Factory: com.sun.jndi.fscontext.RefFSContextFactory
*Connection Factory JNDI Name: MQCF  (As given when creating initial context in Step 4 –> b)
*Destination JNDI Name: TestQ   (As given when creating initial context in Step 5 –> b)

image



c. Click on the currently generated destination

image

d. Change the initial context factory to com.sun.jndi.fscontext.RefFSContextFactory
click ok.
image


10. Create the Bridge

a. Select bridges and new
image
b. Give a name , Quality of service and Started Check box. Click next
image
c. Select  Source Bridge Destination and click next
image

d. Select source provider.  Since the source is a weblogic queue we selected Weblogic 7 or higher

image

e. Select the bridge destination.
image
f.  Since the remote queue is MQ Series . Select Other JMS
image

g. Select the target
image

h. click next and finish