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 » (CCDT) Share Connection object for Queue and Topic

Post new topic  Reply to topic
 (CCDT) Share Connection object for Queue and Topic « View previous topic :: View next topic » 
Author Message
mchan
PostPosted: Fri Nov 04, 2011 2:20 am    Post subject: (CCDT) Share Connection object for Queue and Topic Reply with quote

Apprentice

Joined: 09 Sep 2011
Posts: 29

Hi,

I am using CCDT to connect my JMS client with V7 QM. In my app, I use both queue and topic. If I individually create QCF and TCF (with same CCDT URL as parameter), the Queue connection and Topic connection created from QCF and TCF may ends up in different QM (though same CCDT is used), because I need to use AFFINITY(NONE) for load balancing.

Is that anyway to solve this?
In my app, can I just create one connection serving both Queue and Topic?
or can I use MQConnectionFactory instead of QCF and TCF to create connections, and cast it to QCF and TCF as needed?

Thanks,

Mike
Back to top
View user's profile Send private message
zpat
PostPosted: Fri Nov 04, 2011 2:36 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

You only need one connection to the queue manager.

How this maps to JMS calls - I can't tell you - someone else will know.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Nov 04, 2011 6:58 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

zpat wrote:
You only need one connection to the queue manager.

How this maps to JMS calls - I can't tell you - someone else will know.

You need to have a look at the JMS API's. (JMS 1.1 and JMS 1.2)

Use a Connection created from a ConnectionFactory.
Then you can create a MessageConsumer on it with a Destination...
The destination is a generic object. Only the instance will distinguish between Topic or Queue.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » (CCDT) Share Connection object for Queue and Topic
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.