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 » Same JVM, multiple Qmgrs, multiple machines multiple Ports

Post new topic  Reply to topic
 Same JVM, multiple Qmgrs, multiple machines multiple Ports « View previous topic :: View next topic » 
Author Message
Intruder1
PostPosted: Wed Nov 05, 2003 11:12 am    Post subject: Same JVM, multiple Qmgrs, multiple machines multiple Ports Reply with quote

Newbie

Joined: 05 Nov 2003
Posts: 6

Hi,
I have a QueueManagerPool, in which I'd want to have multiple Qmgrs each connecting to different host and QueueManager name. Is this possible? My concern is if I use the same JVM when I set

MQEnvironment.host, port wouldn't this be overridden for other QueueManagers? How can I ensure that each QMgr gets its own configuration while connecting.

Any ideas, comments?

Thnx a million
Hari
Back to top
View user's profile Send private message
vennela
PostPosted: Wed Nov 05, 2003 11:23 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Hari:
This might help

http://www.mqseries.net/phpBB2/viewtopic.php?t=8019&highlight=mqenvironment
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Intruder1
PostPosted: Wed Nov 05, 2003 1:07 pm    Post subject: Reply with quote

Newbie

Joined: 05 Nov 2003
Posts: 6

Venny,

Thanks for the reply. My situation is kind of different in the sense, I have a multi-threaded application. In this app, each thread owns a particular object say obj1. Each obj1 has the QueueManager handle which I connect when the pool forms and also when the connection goes stale. So if everything starts up in order that is fine.

But in my case, it might happen that when thread1 is connecting to machine1, thread2 might want to connect to machine2. Can I avoid setting MQEnvironment static variables by some other method?

Thnx again
Back to top
View user's profile Send private message
Intruder1
PostPosted: Wed Nov 05, 2003 1:18 pm    Post subject: Reply with quote

Newbie

Joined: 05 Nov 2003
Posts: 6

Venny,

A big sorry. I didn't look at the API's properly. There is an API where I can create the QueueManager by passing the properties in HashTable. I'll try that.

Thnx
Back to top
View user's profile Send private message
vmbala76
PostPosted: Mon Aug 28, 2006 10:14 pm    Post subject: Same JVM, multiple Qmgrs, multiple machines multiple Ports Reply with quote

Newbie

Joined: 28 Aug 2006
Posts: 7

Hi Vennila,
I am also looking the solution for the same problem. Any solution please.

with regards,
Bala
Back to top
View user's profile Send private message
vmbala76
PostPosted: Tue Aug 29, 2006 11:19 pm    Post subject: Reply with quote

Newbie

Joined: 28 Aug 2006
Posts: 7

Instead of setting MQEnvironment variable, we can use the new MQQueueManager(String,Hashtable) constructor to avoid this problem.

Hashtable propSit = new Hashtable();
propSit.put(MQC.HOST_NAME_PROPERTY,"");
propSit.put(MQC.CHANNEL_PROPERTY ,"");
propSit.put(MQC.PORT_PROPERTY,new Integer(1414));

qMgr = new MQQueueManager("",propRnd);
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Same JVM, multiple Qmgrs, multiple machines multiple Ports
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.