ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » connect to another QMGR inside of MDB onMessage()

Post new topic  Reply to topic
 connect to another QMGR inside of MDB onMessage() « View previous topic :: View next topic » 
Author Message
peterw686
PostPosted: Tue Jan 27, 2004 9:23 pm    Post subject: connect to another QMGR inside of MDB onMessage() Reply with quote

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
View user's profile Send private message
bower5932
PostPosted: Wed Jan 28, 2004 6:45 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
leongor
PostPosted: Wed Jan 28, 2004 8:41 am    Post subject: Reply with quote

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
View user's profile Send private message
peterw686
PostPosted: Wed Jan 28, 2004 11:58 am    Post subject: Reply with quote

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
View user's profile Send private message
vennela
PostPosted: Wed Jan 28, 2004 12:20 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » connect to another QMGR inside of MDB onMessage()
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.