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 » Using same QueueSession for multiple queues

Post new topic  Reply to topic
 Using same QueueSession for multiple queues « View previous topic :: View next topic » 
Author Message
boaz
PostPosted: Tue Jul 30, 2002 11:45 pm    Post subject: Using same QueueSession for multiple queues Reply with quote

Apprentice

Joined: 28 May 2002
Posts: 43

Hi,
My application is running on Apache server and using MQ.
Since many threads are created I'm trying to design a a way to create multiple queues on the same QueueSesion.
Each thread will create a session and each session will create some queues.
Is it possible?
Is there any design pattern for this?
my code:

Code:
qconFactory = new MQQueueConnectionFactory();
qconFactory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
qconFactory.setQueueManager(queueManagerName);
qconFactory.setHostName(hostName);
qconFactory.setChannel(channel);
qcon = qconFactory.createQueueConnection();
qsession = qcon.createQueueSession(false,
                                                      Session.AUTO_ACKNOWLEDGE);
for (int i = 0;i<QUEUE_NUM;i++) {
    queue = qsession.createQueue(this.queueName);
    qsender = qsession.createSender(queue);
    msg = qsession.createTextMessage();
}
qcon.start();
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 » Using same QueueSession for multiple queues
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.