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 » Multithreaded MQ design help needed

Post new topic  Reply to topic
 Multithreaded MQ design help needed « View previous topic :: View next topic » 
Author Message
boaz
PostPosted: Tue Aug 27, 2002 3:57 am    Post subject: Multithreaded MQ design help needed Reply with quote

Apprentice

Joined: 28 May 2002
Posts: 43

I have a Multi-threaded application running on a web server in client mode.
Each thread should send a message to MQ Queue manager.
1. Is handling a QueueSession per thread is enough - and then each thread will has its QueueSender.
2. Should I hanlde a QueueConnectionFactory/QueueConnection per thread as well?
3. When is the TCP connection established? when calling the QueueSender.send() or when QueueConnection.start() is called?
is the connection open till calling the QueueConnection.stop()?
Back to top
View user's profile Send private message Send e-mail
ram_2000
PostPosted: Wed Sep 11, 2002 1:38 am    Post subject: Reply with quote

Novice

Joined: 29 Mar 2002
Posts: 12
Location: Vancouver, Canada

First to answer your questions.....

1. Yes...you need one queueSession (queueSender) per thread. Session is not thread safe...

2. you could use the same qcf and queue connection...You can do this in the Servlet init()

3. connection.start() starts the MQI channel (TCP connection), this channel will be active until the connection is closed..

You can do this better with a pool of JMS sessions(and senders). This way you will need a lot fewer sessions (rather than one per thread...)
Back to top
View user's profile Send private message
boaz
PostPosted: Wed Sep 11, 2002 4:19 am    Post subject: Reply with quote

Apprentice

Joined: 28 May 2002
Posts: 43

Thanks!
Is there any design patern/sourse code for JMS Pool?
Boaz
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 » Multithreaded MQ design help needed
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.