|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
connect to another QMGR inside of MDB onMessage() |
« View previous topic :: View next topic » |
Author |
Message
|
peterw686 |
Posted: Tue Jan 27, 2004 9:23 pm Post subject: connect to another QMGR inside of MDB onMessage() |
|
|
Acolyte
Joined: 26 Sep 2002 Posts: 73
|
Hi,
I have a MDB needed to send a message to a Queue Manager other than the MDB listenning to. However, I got 2103 error. Does that means the MDB onMessage() will open a connection to the QMGR it listens to until the method finished.
My scenario is that:
QMGR1
Q1_in <--- MDB_1 listen to
|
-- got msg1, then sent msg11 to Q3
Q1_out
QMGR3
Q3
|--- got msg11, reply to Q2_in (msg11Rply)
QMGR2
Q2_in <---- MDB_2 listen to
|
-- got msg11Rply, then send msg22 to Q1_out
For the first MDB_1, it works fine. However, when the MDB_2 got that message msg11Rply and got error 2103 while sending to Q1_out.
The strange thing is, if I run a single test case which is put a message into Q3 and test MDB_2 directly. I can got correct process.
BTW, I am using the same program for sending message. It's a java client sending method.
I really need to solve this problem and continue on test.
Thanks in advanced. |
|
Back to top |
|
 |
bower5932 |
Posted: Wed Jan 28, 2004 6:45 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
How are your QCF's defined? Are you using a bindings or a client transport? I'm guessing that it is bindings, and I believe that you have to use client in order to connect to the 2nd qmgr from inside the MDB. |
|
Back to top |
|
 |
leongor |
Posted: Wed Jan 28, 2004 8:41 am Post subject: |
|
|
 Master
Joined: 13 May 2002 Posts: 264 Location: Israel
|
You cannot use 2 connections in the same thread.
If you want to do this you need 2 threads with different client(!) connections. _________________ Regards.
Leonid.
IBM Certified MQSeries Specialist. |
|
Back to top |
|
 |
peterw686 |
Posted: Wed Jan 28, 2004 11:58 am Post subject: |
|
|
Acolyte
Joined: 26 Sep 2002 Posts: 73
|
Thanks all,
You are right, before, I set up to Bind model before.
However, right now, I change to use client model and put the sending message process in a seperate thread. I got a nullpoint exception while construction MQQueueManager.
Code: |
java.lang.NullPointerException
at com.ibm.mq.ClientConnectionRequestInfo.equals(ClientConnectionRequestInfo.java:239)
at com.ibm.mq.ManagedConnectionStore$Tuple.equals(ManagedConnectionStore.java:148)
at java.util.Hashtable.get(Hashtable.java:318)
at com.ibm.mq.ManagedConnectionStore.chooseOne(ManagedConnectionStore.java:110)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:124)
at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.java:682)
at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:620)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:393) |
Any idea on that? |
|
Back to top |
|
 |
vennela |
Posted: Wed Jan 28, 2004 12:20 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
You need to post the code snippet where you are creating the QMGR onject. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|