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 » Use of JMSSession

Post new topic  This topic is locked: you cannot edit posts or make replies.
 Use of JMSSession « View previous topic :: View next topic » 
Author Message
mchan
PostPosted: Tue Dec 20, 2011 5:58 pm    Post subject: Use of JMSSession Reply with quote

Apprentice

Joined: 09 Sep 2011
Posts: 29

I am using MQ v7 and JMS.
we want to use multiple threads in our application, each thread listen to different REPLY queue or send to different REQUEST queue.
Understand that there is a restriction that different thread should have their own JMSSession object for processing.
As well, creating a new JMSSession will issue MQCONN MQI call. Having multiple JMS Session will actually create multiple physical MQ connections.

Just want to confirm on this and see if any better way around to minimize creating multiple physical MQ connection while our design can still be met ...

thanks.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Dec 20, 2011 6:35 pm    Post subject: Re: Use of JMSSession Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mchan wrote:
we want to use multiple threads in our application, each thread listen to different REPLY queue or send to different REQUEST queue.


Why are multiple threads of the same application listening to different queues? What's the design thinking here?

As to sending to different queues, that's all about destinations (the JMS equivalent of MQPUT1).

mchan wrote:
Understand that there is a restriction that different thread should have their own JMSSession object for processing.
As well, creating a new JMSSession will issue MQCONN MQI call. Having multiple JMS Session will actually create multiple physical MQ connections.


Connections can't be shared across threads. But you can pool connections with an appropriate architecture.

mchan wrote:
Just want to confirm on this and see if any better way around to minimize creating multiple physical MQ connection while our design can still be met ...


What design? You've given a technical scenario and asked for advice. You've said nothing about your design or the requirements driving it. So how can we comment on possibly better ways?

On the face of it, there ought to be a better way...
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Dec 20, 2011 8:46 pm    Post subject: Reply with quote

Grand High Poobah

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

Can we stop this thread and continue on your other one?
I am still not convinced that your sessions are all spawned from the same connection... hash value for proof?

See discussion here:http://www.mqseries.net/phpBB2/viewtopic.php?t=58796&start=15
and here http://www.mqseries.net/phpBB2/viewtopic.php?t=59817
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  This topic is locked: you cannot edit posts or make replies. Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Use of JMSSession
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.