What we need:
You must have following software installed in your system:
- WebSphere MQ 6
- BEA Weblogic 10
- JDK 1.5 or above. (This comes bundled with Weblogic)
What we going to do:
- Create a queue manager and two local queues namely MQSenderQueue and MQReceiverQueue in Websphere MQ, one for sending a message to our MDB at Weblogic and other one for receiving messages from Weblogic. Create and configure JMS Foreign Server, Destinations and Connection Factories.
- Code and deploy a MDB in Weblogic and automatically receive messages from MQ MQSenderQueue and place it at a second MQ queue MQReceiverQueue using Weblogic Foreign JSM Server features.
For testing:
Creating queue managers, queues and connection factories in WebSphere MQ:- Put a test message to MQSenderQueue at MQ.
- Monitor Weblogic console to see if it has received and sent the message again to MQ.
- See the message received at the MQReceiverQueue at MQ.
Creating queue manage

Image #1: WebSphere MQ Explorer
Click on Start -> Program Files -> IBM WebSphere MQ -> WebSphere MQ Explorer to open WebSphere MQ Explorer. Optionally execute C:\Program Files\ibm\WebSphere MQ\bin strmqcfg.exe to run explorer.

Image #1: WebSphere MQ Explorer
On the left hand side WebSphere MQ Explorer – Navigator pane, click on 'IBM WebSphere MQ' node to expand that, if it is not expanded already.
- To create a queue manager, right click on the ‘Queue Managers’ node and select New -> Queue Manager.
- In the opened window, enter name “MQTest” in the name textbox and keep clicking Next-> and finally click Finish.
Creating WebSphere MQ local queues
Creating JNDI Context and Connection factories
Now let us create MQ queues. As I mentioned above, we are going to create two queues. We will be using one of them to put a test message which is to be received by our MDB at BEA Weblogic and the other one is used by our MDB to put message the message back into second MQ queue, so that we can see the same message again in MQ, but in the second MQ queue.
We are going to create two local queues using MQ explorer.
1. To create our first local MQ queue, right click on Queues node under “MQTest” queue manager. Select New -> Local Queue.
3. Repeat the above two steps to create another local queue “MQReceiverQueue”. Note the naming I followed here – used a prefix MQ to avoid the confusions since we use similar JNDI names in Weblogic also.
Optionally, you may create MQ queue manager and local queues using command prompt. Open a command prompt (CMD) and CD to C:\Program Files\ibm\WebSphere MQ\bin.
We are going to create two local queues using MQ explorer.
1. To create our first local MQ queue, right click on Queues node under “MQTest” queue manager. Select New -> Local Queue.
Image #5: Create local queue in MQ
2. Enter name for our first local MQ queue “MQSenderQueue” as shown below. Click “Next” and finally “Finish”. This is the queue we will be using to put our test message.Image #6: Create local queue in MQ
3. Repeat the above two steps to create another local queue “MQReceiverQueue”. Note the naming I followed here – used a prefix MQ to avoid the confusions since we use similar JNDI names in Weblogic also.
Optionally, you may create MQ queue manager and local queues using command prompt. Open a command prompt (CMD) and CD to C:\Program Files\ibm\WebSphere MQ\bin.
- Create the queue manager: crtmqm MQTest.
- Start the queue manager: strmqm MQTest.
- Create queues in the queue manager:
runmqsc MQTestPlease note that I haven’t tried this option, so I am not sure how it works.
DEFINE QLOCAL(MQSenderQueue)
DEFINE QLOCAL(MQReceiverQueue)
end
Creating JNDI Context and Connection factories
Next, create a simple file-based JNDI context and configure the JMS objects in that JNDI namespace. These JNDI objects are used by applications running in WebSphere Application Server Community Edition to connect to the WebSphere MQ queue manager. For this exercise, WebLogic and WebSphere MQ should be on the same machine.
The setting is for file-based JNDI. Create the directory C:\MQ-JNDI before continuing with the next step. Under new folder C:\MQ-JNDI, create a file mq-jndi.properties with the following contents:
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
PROVIDER_URL=file:/C:/MQ-JNDI
SECURITY_AUTHENTICATION=none
Next open a command prompt, cd to C:\MQ-JNDI, create the QueueConnectionFactory and Queue objects by executing the command:
“C:\Program Files\IBM\WebSphere MQ\Java\bin\JMSAdmin.bat” -cfg mq-jndi.properties
You should see this prompt, where you can configure the JNDI objects:
InitCtx>
At the prompt, copy and paste all five lines of following commands together and press Enter.
You should see a message like “Stopping Websphere MQ classes for Java(tm) Message Service Administration” after you press Enter after the last line “end”.
With that, we now have MQ queues ready (see following image). Next task is to create a MDB in EJB 3 and deploy it in BEA Weblogic 10.
The setting is for file-based JNDI. Create the directory C:\MQ-JNDI before continuing with the next step. Under new folder C:\MQ-JNDI, create a file mq-jndi.properties with the following contents:
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
PROVIDER_URL=file:/C:/MQ-JNDI
SECURITY_AUTHENTICATION=none
Next open a command prompt, cd to C:\MQ-JNDI, create the QueueConnectionFactory and Queue objects by executing the command:
“C:\Program Files\IBM\WebSphere MQ\Java\bin\JMSAdmin.bat” -cfg mq-jndi.properties
You should see this prompt, where you can configure the JNDI objects:
InitCtx>
At the prompt, copy and paste all five lines of following commands together and press Enter.
def xaqcf(MQSenderQCF) qmgr(MQTest)
def xaqcf(MQReceiverQCF) qmgr(MQTest)
def q(MQSenderQueue) qmgr(MQTest) queue(MQSenderQueue)
def q(MQReceiverQueue) qmgr(MQTest) queue(MQReceiverQueue)
end
def xaqcf(MQReceiverQCF) qmgr(MQTest)
def q(MQSenderQueue) qmgr(MQTest) queue(MQSenderQueue)
def q(MQReceiverQueue) qmgr(MQTest) queue(MQReceiverQueue)
end
You should see a message like “Stopping Websphere MQ classes for Java(tm) Message Service Administration” after you press Enter after the last line “end”.
With that, we now have MQ queues ready (see following image). Next task is to create a MDB in EJB 3 and deploy it in BEA Weblogic 10.
Image #7: MQ explorer showing queue manager and local queues.
Configuring Foreign JSM Server in BEA Weblogic Server:
Before starting your Weblogic Server you have to ensure that certain MQ related jar files are in your Weblogic Server’s classpath. Easiest way to do this is to copy following jars from “C:\Program Files\ibm\WebSphere MQ\Java\lib” folder to your Weblogic domain’s lib (C:\bea\user_projects\domains\RnD\lib in my case) folder, from where Weblogic loads them up while starting.
- com.ibm.mq.jar
- com.ibm.mqjms.jar
- commonservices.jar
- dhbcore.jar
- fscontext.jar
Once jars are in Weblogic Server’s class path, start your Weblogic server and login to Weblogic admin console. To start with, click ‘Lock & Edit’ button.
Expand Services -> Messaging on LHS menu and click JMS Modules link.
Click on “New” button on RHS
Type in a name “MQIntegrationTest” in the Name text box and press Next.
Expand Services -> Messaging on LHS menu and click JMS Modules link.
Click on “New” button on RHS
Image #8: Configuring JMS module
Type in a name “MQIntegrationTest” in the Name text box and press Next.
Image #9: Configuring JMS module
Select the Target server (in my case it was AdminServer) as shown below, press Next and finally Finish. Click on “Activate Changes” button on LHS.Image #10: Creating JMS module
Create JMS Foreign Server
Creating MDB and deploying it.Click on Lock & Edit again.
Select Services -> Messaging -> JMS Modules as you did earlier, and click on newly created module “MQIntegrationTest”. Click New button.
Select “Foreign Server” radio button and click “Next”.
Click Lock & Edit again.
Open the newly created Foreign JMS server byt clicking Services -> Messaging -> JMS Modules -> MQIntegrationTest -> MQTestForeignServer.
Under the General tab under Configuration, type in following details:
JNDI Initial Context Factory: com.sun.jndi.fscontext.RefFSContextFactory
JNDI Connection URL: file:/C:/MQ-JNDI
Click “Save”.
Click on Destinations link in the Configuration tab at the top and click New
Name: ReceiverDetails
Local JNDI Name: jms/WLReceiverQueue
Remote JNDI Name: MQSenderQueue
Note that the Remote JNDI Name must match the name of the queue you created in WebSphere MQ broker.
Click OK.
Name: ReplyDetails
Local JNDI Name: jms/WLReplyQueue
Remote JNDI Name: MQReceiverQueue
Now you can see two Destinations created:
Let’s create two Connection Factories for above queues.
Click on Connection Factories (next to Destinations) and click New
Enter following details in “Create a New Foreign JMS Connection Factory” page.
Name: ReceiverCF
Local JNDI Name: jms/WLReceiverQCF
Remote JNDI Name: MQSenderQCF
Again, the remote JNDI name must match on you have given to MQ connection factory.
Click Ok.
Name: ReplyCF
Local JNDI Name: jms/WLReplyQCF
Remote JNDI Name: MQReceiverQCF
With that, you can see two Connection Factories created for our Foreign JMS Server like shown below:
Select Services -> Messaging -> JMS Modules as you did earlier, and click on newly created module “MQIntegrationTest”. Click New button.
Select “Foreign Server” radio button and click “Next”.
Image #11: Creating JMS foreign server
Enter “MQTestForeignServer” in the Name text box, click Next button. In this page you can see that the target server is selected already. Click Finish.Image #12: Creating JMS foreign server
Image #13: Creating JMS foreign server
Activate changes by clicking “Activate Changes” button.Click Lock & Edit again.
Open the newly created Foreign JMS server byt clicking Services -> Messaging -> JMS Modules -> MQIntegrationTest -> MQTestForeignServer.
Under the General tab under Configuration, type in following details:
JNDI Initial Context Factory: com.sun.jndi.fscontext.RefFSContextFactory
JNDI Connection URL: file:/C:/MQ-JNDI
Click “Save”.
Image #14: Configure JMS foreign server
Creating DestinationsClick on Destinations link in the Configuration tab at the top and click New
Image #15: Create Destinations
Type in following:Name: ReceiverDetails
Local JNDI Name: jms/WLReceiverQueue
Remote JNDI Name: MQSenderQueue
Note that the Remote JNDI Name must match the name of the queue you created in WebSphere MQ broker.
Click OK.
Image #16: Configure Destination
Repeat the above to create another Destination with following details:Name: ReplyDetails
Local JNDI Name: jms/WLReplyQueue
Remote JNDI Name: MQReceiverQueue
Now you can see two Destinations created:
Image #17: Newly created Destinations
Creating DestinationsLet’s create two Connection Factories for above queues.
Click on Connection Factories (next to Destinations) and click New
Image #18: Create connection factories
Enter following details in “Create a New Foreign JMS Connection Factory” page.
Name: ReceiverCF
Local JNDI Name: jms/WLReceiverQCF
Remote JNDI Name: MQSenderQCF
Again, the remote JNDI name must match on you have given to MQ connection factory.
Click Ok.
Image #19: Create connection factory
Repeat the above steps to create one more connection factory for our ReplyQueue:Name: ReplyCF
Local JNDI Name: jms/WLReplyQCF
Remote JNDI Name: MQReceiverQCF
With that, you can see two Connection Factories created for our Foreign JMS Server like shown below:
Image #20: Connection factories
Click on “Activate Changes” to activate changes. With that you are done with creating and configuring Foreign JMS Server. The only thing pending before we test is to code and deploy our MDB.Here is the MDB code:
/*
* File: TestMDB.java
* Copyright (c) 2007-2008 ibswings.com. All rights reserved.
*/
package com.ibswings.ejb3.mdb;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.annotation.Resource;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.QueueConnection;
import javax.jms.QueueSender;
import javax.jms.QueueSession;
import javax.jms.Session;
import javax.jms.TextMessage;
/**
* Class: TestMDB
*
* @author Ishwara Varnasi
* @date Feb 17, 2008
*/
@MessageDriven(name = "TestMDB", mappedName = "jms/WLReceiverQueue",
activationConfig = {@ActivationConfigProperty(
propertyName = "destinationType",
propertyValue = "javax.jms.Queue")}
)
public class TestMDB implements MessageListener {
public void onMessage(Message msg) {
System.out.println("\n=========================================");
System.out.println("=> Message received!");
if (msg instanceof TextMessage) {
try {
System.out.println("=> Message: "
+ ((TextMessage) msg).getText());
} catch (JMSException e) {
e.printStackTrace();
}
}
// Place the message on to the reply queue (WLReplyQueue)
putMessage(msg);
System.out.println("=========================================");
}
@Resource(name = "WLReplyQueue", mappedName = "jms/WLReplyQueue")
private javax.jms.Queue queue;
@Resource(name = "WLReplyQCF", mappedName = "jms/WLReplyQCF")
private javax.jms.QueueConnectionFactory tcf;
public void putMessage(javax.jms.Message msg) {
System.out.println("=> Placing message on WLReplyQueue...");
QueueConnection queueConnection = null;
QueueSession queueSession = null;
QueueSender queueSender = null;
try {
queueConnection = tcf.createQueueConnection();
queueSession = queueConnection.createQueueSession(false,
Session.AUTO_ACKNOWLEDGE);
queueSender = queueSession.createSender(queue);
queueSender.send(msg);
System.out.println("=> Message sent!");
} catch (Exception e) {
System.out.println("Exception: ");
e.printStackTrace();
if (e instanceof JMSException) {
((JMSException) e).getLinkedException().printStackTrace();
}
} finally {
try {
System.out.println("=> Closing Connection");
queueSession.close();
queueConnection.close();
} catch (Exception e) {
System.out.println("Exception: ");
e.printStackTrace();
if (e instanceof JMSException) {
((JMSException) e).getLinkedException().printStackTrace();
}
}
}
}
@PostConstruct
public void postCreate() {
System.out.println("Bean Created");
}
@PreDestroy
public void preDestroy() {
System.out.println("Bean Destroyed");
}
}
The above code is for a simple message driven bean. It receives messages from MQSenderQueue and onMessage() prints out the content of text message received. Next it places the message back to the WLReplyQue. Note that in the code we never directly place message on to MQ queue. We are actually placing the message to a MQ queue namely MQReceiverQueue using Foreign JMS Server and local Weblogic JNDI name WLReplyQue.
Since we are using EJB 3, we actually do not need an ejb-jar.xml since we are using annotaions. However, to make it work on Weblogic 10, we still need a weblogic-ejb-jar.xml. Somehow I couldn’t get it working without this. Also note that I am using an older (90) schema for weblogic-ejb-jar.xml. Following is the content of Weblogic-ejb-jar.xml:
Since we are using EJB 3, we actually do not need an ejb-jar.xml since we are using annotaions. However, to make it work on Weblogic 10, we still need a weblogic-ejb-jar.xml. Somehow I couldn’t get it working without this. Also note that I am using an older (90) schema for weblogic-ejb-jar.xml. Following is the content of Weblogic-ejb-jar.xml:
<weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/90"
j2ee="http://java.sun.com/xml/ns/j2ee"
xsi="http://www.w3.org/2001/XMLSchema-instance"
schemalocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
<weblogic-enterprise-bean>
<ejb-name>TestMDB</ejb-name>
<message-driven-descriptor>
<destination-jndi-name>
jms/WLReceiverQueue
</destination-jndi-name>
<connection-factory-jndi-name>
jms/WLReceiverQCF
</connection-factory-jndi-name>
</message-driven-descriptor>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
j2ee="http://java.sun.com/xml/ns/j2ee"
xsi="http://www.w3.org/2001/XMLSchema-instance"
schemalocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
<weblogic-enterprise-bean>
<ejb-name>TestMDB</ejb-name>
<message-driven-descriptor>
<destination-jndi-name>
jms/WLReceiverQueue
</destination-jndi-name>
<connection-factory-jndi-name>
jms/WLReceiverQCF
</connection-factory-jndi-name>
</message-driven-descriptor>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
Create EJB jar and deploy it in Weblogic Server. You need to restart Weblogic instance if you do any changes in MQ to reflect that in Weblogic. We are all set to test now!
Testing
Open WebSphere MQ explorer, click on MQTest (our queue manager) -> Queues. On the RHS table, right click on MQSenderQueue and select “Put test message” in the popup menu. Type in a test message, say, “Hello MQ-Weblogic World!”, click “Put Message” and close.
=========================================
=> Message received!
=> Message: Hello MQ-Weblogic World!
=> Placing message on WLReplyQueue...
=> Message sent!
=> Closing Connection
=========================================
Now go to MQ explorer and check messages in the second queue – MQReceiverQueue – you should be able to see this message.
This article is inspired by an article by Sanjay M Kesavan at
http://www-128.ibm.com/developerworks/websphere/library/techarticles/0604_kesavan/0604_kesavan.html
I would like thank Mr. Kesavan, author of above wonderful article.
That’s it. You may send your feedbacks to me on ivarnasi@gmail.com.
Image #21: Put a test message for testng.
Go to your Weblogic Servers’ output console and you will see the message. Outputs look like:=========================================
=> Message received!
=> Message: Hello MQ-Weblogic World!
=> Placing message on WLReplyQueue...
=> Message sent!
=> Closing Connection
=========================================
Now go to MQ explorer and check messages in the second queue – MQReceiverQueue – you should be able to see this message.
Image #22: Queues with messages.
This article is inspired by an article by Sanjay M Kesavan at
http://www-128.ibm.com/developerworks/websphere/library/techarticles/0604_kesavan/0604_kesavan.html
I would like thank Mr. Kesavan, author of above wonderful article.
That’s it. You may send your feedbacks to me on ivarnasi@gmail.com.
103 comments:
Thank you! Looks very helpful!
I have a few comments:
The example uses MQ "bindings" mode, which requires that MQ and WL servers all run on the same machine. To use an XA capable remote MQ client, configure the MQ connection factory with TCP mode, and use the "WebSphere MQ Extended Transactional Client" instead.
For additional JMS integration information, see FAQs: Integrating Remote JMS Providers. The FAQ explores other options and has numerous links into WebLogic documentation. For even further help, one can try posting to the
weblogic.developer.interest.jms newsgroup.
Tom Barnes, BEA Systems
WebLogic JMS Developer Team
Hi Tom,
Thanks for your feed back and mentioning about JNDI bindings file. I missed to mention this. I will try an example with remote MQ and publish a post when I get some time.
thanks
Ishwara Varnasi
Hi Ishwara,
This post has been very helpful for me. I think there's one very minor error: I think the second line of mq-jndi.properties file should read:
'PROVIDER_URL=file:/C:/MQ-JNDI'
instead of:
'PROVIDER_URL=file:/C:/JNDI-Directory'
Thanks again,
Matt
Matt, thanks for figuring this out. Fixed it.
thanks
Ishwar
Hi Ishwara,
i have followed most of your steps.. n i have written a short test code to put message into the Queue.. but unfortunately, I kept getting this error message
java.lang.UnsatisfiedLinkError: C:\Program Files\IBM\WebSphere MQ\Java\lib\mqjbnd05.dll: Can't find dependent libraries
any idea?
Hi Ishwara,
i have another question. let's say.. if my MQ server is not at the same server as my Weblogic server, how should i configure ? and what should i do?
Thanks in advance
Hi,
I am sorry that I am not getting time to check these things out now. Also I am working on sort of different technologies... I will try to make some time to find solutions. In the mean time, I suggest you to try finding something on related forums.
thanks
Ishwar
Hi,
I have followed all the instructions as mentioned in the post, but the message's are not being picked up by weblogic at all.
When I add a message to the SenderQueue, it just stays there, and there is no action from the MDB deployed on weblogic.
Any idea what could be wrong/missing. Thanks in advance.
Regards,
Pradeep Chellur.
Hi,
I have my MQ Server on a different machine and WLS 10 on a different machine.
Can you help me out with the changes that I need to make so that I don't get this error:
MQJMS2005: failed to create MQQueueManager for hostname:QueueManagerName
Thanks,
-deepa.
Would sincerely hope that you can update your guides to cater for seperate MQ and Weblogic servers setup. I am meeting the exact same issue as deepa.
Thanks,
Chris Chew
Hi Chris/Deepu/Deepa...
My apologies for not having replied to your queries... Unfortunately I am not in a position to answer your questions since I have been working on technologies like SOA/ESB and Web Services for sometime now... I will try out these whenever I get some time... Tom (Tom Barnes) might be able to guide you (us) on these.
thanks
Ishwara Varnasi
Hi All!
Does somebody integrate MQ with Weblogic, that are located on different machines?
Please give some advise, or where can I read about it.
Thank you a lot.
Hi,
Thanks for a very helpful post.
But as many people here have asked - Any pointers on how to do it if MQ Server and WLS are on separate machines?
Thanks in advance.
best regards,
Murali
If you have MQ and Weblogic on separate machines, you must create binding file with connection factory, that have attribute transport=client. This means, that you are using client mode.
Than copy this binding file to machine where WLS is located, and put this location to "JNDI Connection URL" property in Foreign Server configuration.
It is the main difference.
Hi Vito,
Thanks very much for that pointer.
I did not realize that I had to copy the bindings file to the WLS machine :) I was trying to map it thru the network.. :)
Now at least the MDB on WLS attempts to connect to MQ Server on a remote machine, though it fails.
Initially I got a ClassNotFoundException for which I had to add com.ibm.mq.jmqi.jar into WLS/domain/lib folder. That was ok.
Next, it fails with a MQ SecurityException
<28-Dec-2009 16:47:37 o'clock CET> (WMQConnection.java:410)
at com.ibm.msg.client.wmq.internal.WMQXAConnection.(WMQXAConnection.java:70)
at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createV7ProviderConnection(WMQXAConnectionFactory.java:178)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:7331)
at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createProviderXAConnection(WMQXAConnectionFactory.java:101)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createXAConnectionInternal(JmsConnectionFactoryImpl.java:332)
at com.ibm.mq.jms.MQXAConnectionFactory.createXAConnection(MQXAConnectionFactory.java:98)
at weblogic.ejb.container.internal.JMSConnectionPoller.getXAConnection(JMSConnectionPoller.java:416)
at weblogic.ejb.container.internal.JMSConnectionPoller.getConnection(JMSConnectionPoller.java:463)
at weblogic.ejb.container.internal.JMSConnectionPoller.createJMSConnection(JMSConnectionPoller.java:1991)
at weblogic.ejb.container.internal.JMSConnectionPoller.connect(JMSConnectionPoller.java:826)
at weblogic.ejb.container.internal.MDConnectionManager.startConnectionPolling(MDConnectionManager.java:239)
at weblogic.ejb.container.manager.MessageDrivenManager.start(MessageDrivenManager.java:583)
at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.mdManagerStart(MessageDrivenBeanInfoImpl.java:1163)
at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.deployMessageDrivenBeans(MessageDrivenBeanInfoImpl.java:1143)
at weblogic.ejb.container.deployer.EJBDeployer.deployMessageDrivenBeans(EJBDeployer.java:1674)
at weblogic.ejb.container.deployer.EJBDeployer.deployMessageDrivenBeansUsingModuleCL(EJBDeployer.java:1450)
at weblogic.ejb.container.deployer.MDBServiceImpl.startService(MDBServiceImpl.java:69)
at weblogic.server.ServiceActivator.start(ServiceActivator.java:98)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2063' ('MQRC_SECURITY_ERROR').
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:206)
Possibly some MQ settings, i am still looking into it..
If someone can help ;) thanks in advance.
-Murali
Yup !!! Managed to do it !!! :)
Unfortunately it took a little time for me to get this working...but somehow managed it.
It was something to do with the configuration of Server Connection Channel in MQ Server.
On WLS startup, the MDB was not deployed properly because it was failing with MQSecurityException.
Just googled around and after a lot of trial and error, set the MCAUSER in channel to the same user who logs in. It worked. Have to read more to understand that..
Meanwhile noticed in MQ Explorer that the channel was always inactive :) and somehow missed it all the while..after setting MCAUSER, it started.
Anyways, thanks.
-Murali
The WebLogic documentation links I posted above are out of date. New links:
* JMS Information Roadmap
* FAQ: Integrating Remote JMS Providers
* Using EJB/Servlet JMS Resource References
* Enhanced Support for Using WebLogic JMS with EJBs and Servlets
* Using Messaging Beans
* Programming Message-Driven Beans
* Good MDB with res-ref example (example 9-5)
Tom Barnes, Oracle
WebLogic JMS Developer Team
Thanks a lot, It is very useful.
Tried searching in google, but did not find the right article. Its very useful. And that too, this is first article I read......very useful.
Thanks for your effort.
Hi Ishwara,
We've gone through your article related to Weblogic integration with Websphere MQ for Queues.
We are in the process of integrating Weblogic 10.X with Websphere MQ 6.x for Topic.
"We are getting the following error MQJMS1111: JMS1.1 The required Queues/Publish Subscribe services are not set up".
Can you please help us in resolving the error!
Thanks,
Kamalakar
I tried to integrate this code for our project where MDB listens to a remote MQ server.
I faced following problems
Modify C:\Program Files\IBM\WebSphere MQ\Java\bin\JMSAdmin.bat
Modified java to %MQ_HOME%/java in order to point to corrrect location of IBM JVM.
Indranil Nag
Creation of a remote queue manager bindings by
"C:\Program Files\IBM\WebSphere MQ\Java\bin\JMSAdmin.bat" -v -cfg mq-jndi.properties
use -v option for verbose output.
I tried to recreate on the existing .bindings gave lot of problem .Delete .bindings in case of error.
Enter port and server channel in case of remote mq port
def xaqcf(MQSenderQCF) qmgr(MQTest) HOST(mqhost.mydomain.com) PORT(1417) TRANSPORT(CLIENT) CHANNEL(HPT5.CLNT.WL)
def xaqcf(MQReceiverQCF) qmgr(MQTest) HOST(mqhost.mydomain.com) PORT(1417) TRANSPORT(CLIENT) CHANNEL(HPT5.CLNT.WL)
def q(MQSenderQueue) qmgr(MQTest) queue(MQSenderQueue)
def q(MQReceiverQueue) qmgr(MQTest) queue(MQReceiverQueue)
end
For weblogic deployment copy mq jars to server lib directory otherwise you will get lots of exception for
com.sun.jndi.fscontext.RefFSContextFactory
After copying the mq jars restart the server
Indranil Nag
When WLS and MQ are installed on different machines, we need to install MQ transactional client to successfully integrate WLS with MQ.
Install MQ transactional clinet and then run MQ's JMSAdmin utility (Step 5) to bind MQ destination with a JNDI name.
Hi sorry I'm new to weblogic. how do i create MDB and deploy it on weblogic server? is it like some other java class file?
Another question is creating EJB jar file? how do i create it?
Thanks
Also, One may also want to send an MQ message to remote queue from the MDB, in order to do that, old bindings file needs to be deleted and followign executed:
def xaqcf(ReceiverQCF) qmgr(testqmgr)
def xaqcf(SenderQCF) qmgr(testqmgr)
def q(MyMDBQueue) qmgr(testqmgr) queue(MyMDBQueue)
def q(MyRemoteQueue) qmgr(testqmgr) queue(MyRemoteQueue)
end
prior to this channels xmit queues, remote queue and local queues need to be created, also another queue manager. This can be done on the same machine, just second queue manager needs to have another port and listener port needs to change as well. Steps to create remote queues and channels can be found in tutorials of MQ explorer.
Hi ISHWARA,
I wanna know one things. How should I add Primary /Secondary for and in the weblogic-ejb-jar.xml.
Regards
Hi ISHWARA,
I wanna know one things. How should I add Primary /Secondary for destination-jndi and connection factory-jndi in the weblogic-ejb-jar.xml.
MDB is not able to connect destination on the Foreign JMS Server. I have the bindings file for the MQ created in file:/C:/JNDI-Directory
-----------------------------------Contents from weblogic-ejb-jar.xml
MessageDrivenEJBBean
jms/q
jms/qcf
--------------------------------------------------------------------------------
Contents from Config's descriptor file jms/mqintegrationtest-jms.xml
true
jms/q
q
jms/qcf
qcf
com.sun.jndi.fscontext.RefFSContextFactory
file:/C:/JNDI-Directory
Any pointers on this would be appreciated
Hi All..
Earlier I was getting error due to JNDI look up was failed since i have targeted the Foreign server to local jms server ( used advanced targeting instead of Default targetting )
Now I managed to fix it.
But, It quite took long time.
Finally Happy..
The deployment descriptor provided by Ishwar is old and the XSI schema location is not present at all ( I guess ).. Now i have re-edited the
Deployment descriptor to deploy MDB to weblogic latest versions 10.4 etc.
if any one has doubts related to deployment descriptor.. please post.
Special Thanks to Ishwara. Move on..
Thx,
Sara
WebSphere MQ, a member of the WebSphere family from IBM, was the most popular system for messaging across multiple platforms.
.your providing good mater .
IBM MQ SERIES ADMIN ONLINE TRAINING
your providing such a valuabe information about studying..and also have some good key points to every student.
the best pega Online Training training
Hi ISHWARA VARNASI,
Thx for excellent post,very useful for every one.I also follow the blog but I got one issue,i.e
cau u plz guide what I missed.
Regards
Mani
Hi All,
What is the importance of config's descriptor file while integrating weblogic and MQ on different machines? and where should i place this file? Appreciate your responses....
When i am trying to Put a message in MQ local queue(MQSenderQueue) but, it is showing in same MQSenderQueue current queue depth.
Hi Guys,
I am trying to use JNDI in my Apache Camel project on spring framework. I followed exact steps & then I created JMSComponent in spring . My Application is not giving any error so Configuration seems to be correct but I am not sure what the problem is, any help is appreciated..
Here's the configuration:
applicationContext.xml:
(html encoded )
<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory" ref="myConnectionFactory2"/>
</bean>
<jee:jndi-lookup id="myConnectionFactory2" jndi-name="jms/WLReceiverQCF"/>
HelloRoute.java:
class HelloRoute extends RouteBuilder {
public void configure() throws Exception {
from("jms:queue:jms/WLReceiverQueue").to("file:D:\\target");
}
Thanks for sharing useful information about Web Logic Server and refer the link Android Training in Chennai
Thanks for sharing useful information about Web Logic Server and refer the link Android Training in Chennai
Thanks for sharing this excellent post. Its really very informative and interesting. Keep update your blog. For a best Android training in Chennai please refer this site.
Regards....
Android Training Chennai
Oracle Training in chennai
I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly..
Oracle Training in chennai
Wonderful blog.. Thanks for sharing informative blog.. its very useful to me..
Informatica Training in chennai
Thanks for sharing such a great information..Its really nice and informative
Pega Training in Chennai
This post is really nice and informative. The explanation given is really comprehensive and informative..
There are lots of information about latest technology and how to get trained in them, like Hadoop Training in Chennai have spread around the web, but this is a unique one according to me. The strategy you have updated here will make me to get trained in future technologies Hadoop Training in Chennai By the way you are running a great blog. Thanks for sharing this.
Whatever we gathered information from the blogs, we should implement that in practically then only we can understand that exact thing clearly, but it’s no need to do it, because you have explained the concepts very well. It was crystal clear, keep sharing..
QTP Training in Chennai
SAS Training in Chennai
Thanks for sharing this informative blog. I did SAS Certification in Greens Technology at Adyar. This is really useful for me to make a bright career..
This information is impressive..I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic
Greens Technologies In Chennai
Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
Greens Technologies In Chennai
Thanks for sharing amazing information about pega Gain the knowledge and hands-on experience you need to successfully design, build and deploy applications with pega. Pega Training in Chennai
Who wants to learn Informatica with real-time corporate professionals. We are providing practical oriented best Informatica training institute in Chennai. Informatica Training in chennai
QTP is a software Testing Tool which helps in Functional and Regression testing of an application. If you are interested in QTP training, our real time working. QTP Training in Chennai
Looking for real-time training institue.Get details now may if share this link visit Oracle Training in chennai
Hey, nice site you have here!We provide world-class Oracle certification and placement training course as i wondered Keep up the excellent work experience!Please visit Greens Technologies located at Chennai Adyar Oracle Training in chennai
Awesome blog if our training additional way as an SQL and PL/SQL trained as individual, you will be able to understand other applications more quickly and continue to build your skill set which will assist you in getting hi-tech industry jobs as possible in future courese of action..visit this blog Green Technologies In Chennai
Nice site....Please refer this site also nice if Our vision succes!Training are focused on perfect improvement of technical skills for Freshers and working professional. Our Training classes are sure to help the trainee with COMPLETE PRACTICAL TRAINING and Realtime methodologies. Green Technologies In Chennai
Job oriented Hadoop training in Chennai is offered by our institute. Our training is mainly focused on real time and industry oriented. We provide training from beginner’s level to advanced level techniques thought by our experts. Hadoop Training in Chennai
I also wanted to share few links related to sas training Check this sitete.if share indepth sas training.Go here if you’re looking for information on sas training. SAS Training in Chennai
Greens Technology offer a wide range of training from ASP.NET , SharePoint, Cognos, OBIEE, Websphere, Oracle, DataStage, Datawarehousing, Tibco, SAS, Sap- all Modules, Database Administration, Java and Core Java, C#, VB.NET, SQL Server and Informatica, Bigdata, Unix Shell, Perl scripting, SalesForce , RedHat Linux and Many more.
Greens Technologies Training In Chennai Excellent information with unique content and it is very useful to know about the information based on blogs
Thanks for sharing this nice useful informative post to our knowledge, Actually SAS used in many companies for their day to day business activities it has great scope in future.
Our HP Quick Test Professional course includes basic to advanced level and our QTP course is designed to get the placement in good MNC companies in chennai as quickly as once you complete the QTP certification training course.
A Best Pega Training course that is exclusively designed with Basics through Advanced Pega Concepts.With our Pega Training in Chennai you’ll learn concepts in expert level with practical manner.We help the trainees with guidance for Pega System Architect Certification and also provide guidance to get placed in Pega jobs in the industry.
Great post and informative blog.it was awesome to read, thanks for sharing this great content to my vision.Informatica Training In Chennai
There are lots of information about latest technology and how to get trained in them, like Hadoop Training Chennai have spread around the web, but this is a unique one according to me. The strategy you have updated here will make me to get trained in future technologies(Hadoop Training in Chennai). By the way you are running a great blog. Thanks for sharing this.
Oracle Training in Chennai is one of the best oracle training institute in Chennai which offers complete Oracle training in Chennai by well experienced Oracle Consultants having more than 12+ years of IT experience.
It is really very helpful for us and I have gathered some important information from this blog.
Oracle Training In Chennai
The best Kits Online Trainings,thanks for sharing this useful information.
SQL Server 2012 DBA Online Training institute
SQL Server 2012 Online Training institute
Thanks for sharing this informative blog .Actually obiee is To make it easier for you Greens Techonologies at Chennai is visualizing all the materials about (OBIEE).SO lets Start brightening your future.and using modeling tools how to prepare and build objects and metadata to be used in reports and more trained itself visit Obiee Training in chennai
I would recommend the Qlikview to anyone interested in learning Business Intelligence .Absolutely professional and engaging training sessions helped me to appreciate and understand the technology better. thank you very much if our dedicated efforts and valuable insights which made it easy for me to understand the concepts taught and more ... qlikview Training in chennai
if learned in this site.what are the tools using in sql server environment and in warehousing have the solution thank .. msbi training In Chennai
i wondered keep share this sites .
performance tuning training In Chennai which NO:1 Greens Technologies In Chennai
It's really helpful for me to understand. Thanks.If anyone wants to Learn visit this page sybase training In Chennai
i gain the knowledge of Java programs easy to add functionalities play online games, chating with others and industry oriented coaching available from greens technology chennai in Adyar may visit. core java training In Chennai
have to learned to lot of information about java Gain the knowledge and hands-on experience you need to successfully design, build and deploy applications with java.
Java Training in Chennai
Looking for real-time training institue.Get details now may if share this link visit
Spring Training in chennai
oraclechennai.in:
Hybernet is a framework Tool. If you are interested in hybernet training, our real time working.
Hibernate Training in Chennai.
hibernate-training-institute-center-in-chennai
Job oriented form_reports training in Chennai is offered by our institue is mainly focused on real time and industry oriented. We provide training from beginner’s level to advanced level techniques thought by our experts.
forms-reports Training in Chennai
Job oriented form_reports training in Chennai is offered by our institue is mainly focused on real time and industry oriented. We provide training from beginner’s level to advanced level techniques thought by our experts.
forms-reports Training in Chennai
Excellent information with unique content and it is very useful to know about the information based on blogs.
Selenium Training in Chennai | QTP Training In Chennai
This information is impressive..
obiee Training in Chennai
Excellent information with unique content and it is very useful to know about the information based on blogs.
Informatica Training In Chennai
Hadoop Training In Chennai
Oracle Training In Chennai
SAS Training In Chennai
very nice article.
SAP Bw Hana Training
SAP Fico Training
SAP Hana Training
I wanted to create two local queues using MQ explorer and your article helped me a lot:) I though it would be more difficult. It's absolutely affordable and very cheap to use http://custom-writing.services/ for your academic needs!
Thanku for sharing..
SAS Institute introduced the SAS Certified Professional Program,training proper understanding of how the SAS software works. Among the five certification programs that SAS Institute has come up with, SAS training can be considered as the entry point into the big data and the data analytics industry.
SAS online training in hyderabad
Awesome..You have clearly explained …Its very useful for me to know about new things..Keep on blogging..
seo institute chennai
Hi,
Do we have any example similar to this foreign server concept but local server(weblogic) & remote server(websphere) on running on different machines? I am getting exception as "While trying to lookup 'jms.VNSIncomingQueue' didn't find subcontext 'jms'. Resolved ''" though I specified JNDI as "jms/VNSIncomingQueue".
Immediate response appreciated please.
Interesting Article
JMS training | Java Online Training
Java Training in Chennai | JMS training online
JMS Training Institutes in Chennai JMS Training Institutes in Chennai
I have read your blog its very attractive and impressive. I like it your blog.
JavaEE Training in Chennai JavaEE Training in Chennai Core Java 8 Training in Chennai Java 8 Training in Chennai Java Online Training Java Online Training
Java Training in Chennai Java Training in Chennai Core Java Training in Chennai Core Java Training in Chennai
Nice guidance and steps which includes on JAVA, keep it up for more Core and Adv JAVA online training
nice blog, thanks for sharing
Dataguard Online Training Institute
Best Sap ABAP Training Institute In UK
Abinitio Online Training Institute in US
SQL Server DBA Online Training Real Time Support
For the above as mentioned A channel has to be created for connecting the above queues to Weblogic. What kind of channel has to be created for the same?
Receiver?sender?server connection?
Please reply ASAP
Very Nice Blog I like the way you explained these things.
Indias Fastest Local Search Engine
CALL360
Indias Leading Local Business Directory
Green Ladies hostel is specifically the safest women's hostel in Chennai near Solinganallur. Surrounded by good hotels, hospitals, bus stands and shopping malls.Ladies hostel Adyar
brilliant article that I was searching for. Helps me a lot
call360 is Fastest local search Engine we have 12 years of experience in online industery, in our Search Engine we offer,
more than 220 categories and 1 Million Business Listing most frequently search categories
are Money exchange Chennai and Bike mechanic Chennai,
we deliver 100% accure data to users & 100% Verified leads to our
registered business vendors and our most popular categories are
AC mechanic chennai,
Advertising agencies chennai
catering services chennai
brilliant article that I was searching for. Helps me a lot.
We are one of the Finest ladies hostel near OMR and our
womens hostel in adyar is secure place for working womens
we provide home based food with hi quality, our hostel located very near to Adyar bus depot.
womens hostel near Adyar bus depot, we are one of the best and experienced
womens hostel near omr
Thanks for the awesome share
Hi we at Colan Infotech Private Limited , a company which is Situated in US and India, will provide you best service and our talented team will assure you best result and we are familiar with international markets, We work with customers in a wide variety of sectors. Our talented team can handle all the aspects of custom application development, we are the best among the dot net development companies in Chennai asp .net web development company
We have quite an extensive experience working with asp .net development services. we are the only asp.net web development company which offer custom services to a wide range of industries by exceeding our client’s expectations. You can even interact directly with the team regarding your project, just as you would with your in-house team, to achieve your dream product.Custom application development company, asp.net development companies,Hire asp .net programmers,asp.net web development services,dot net development companies in chennai Hire asp .net programmers. Here is a good resource if anyone in need of asp.net web development services
dot net development companies in chennai
Thanks for sharing this information article
Hi we at Colan Infotech Private Limited , a company which is Situated in US and India, will provide you best service and our talented team will assure you best result and we are familiar with international markets, We work with customers in a wide variety of sectors. Our talented team can handle all the aspects of custom application development, we are the best among the dot net development companies in Chennai . asp .net web development company We have quite an extensive experience working with asp .net development services. we are the only asp.net web development company which offer custom services to a wide range of industries by exceeding our client’s expectations. You can even interact directly with the team regarding your project, just as you would with your in-house team. hire asp.net programmers to achieve your dream product.
Custom application development company, asp.net development companies, asp .net web development company,Hire asp .net programmers,asp.net web development services,dot net development companies in chennai Hire asp .net programmers/ hire asp .net developer . We are the best asp .net development company providing top notch asp .net development services Hire asp .net programmers/ hire asp .net developer . We are the best asp .net development company providing top notch asp .net development services.
Great post! I am actually getting ready to across this information, It's very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
PEGA Training in Chennai
Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info.
Hadoop Training in Chennai
Big Data Training in Chennai
Python Training in Chennai
Python Training Centers in Chennai
Data Science Training in Chennai
Data Science Course in Chennai
Data Analytics Training in Chennai
Best AngularJS Training in Chennai
AngularJS Training in Chennai
QlikView Training in Chennai
Informatica Training in Chennai
Thank you for giving this best information. It’s a very nice topic
SAP HANA Remote Online Access
Excellent Article, Keep posting
AC Mechanic in Anankaputhur
AC Mechanic in Ashok Nagar
AC Mechanic in Ayanavaram
AC Mechanic in Chetpet
AC Mechanic in Chrompet
Post a Comment