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 » Multiple QCF in bindings file

Post new topic  Reply to topic
 Multiple QCF in bindings file « View previous topic :: View next topic » 
Author Message
ambidextrous
PostPosted: Mon Jun 11, 2012 2:12 pm    Post subject: Multiple QCF in bindings file Reply with quote

Newbie

Joined: 11 Jun 2012
Posts: 2

Currently we have a single bindings file where it will be connected to one development environment. Now we have 3 more environments to connect to, Queues names are same in all environments, with different queue managers.

For more environments, do we need to add QCF for each environment in properties file. Can we use a single bindings file to connect to multiple QCFs?

If so, how do we differentiate between the environments in Java code. Do we have to pass environment name as argument while running the java code and make the necessary changes in java code to check the env, so that the messages going through java code can write up to correct queue manager.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jun 11, 2012 7:44 pm    Post subject: Re: Multiple QCF in bindings file Reply with quote

Grand High Poobah

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

ambidextrous wrote:
Currently we have a single bindings file where it will be connected to one development environment. Now we have 3 more environments to connect to, Queues names are same in all environments, with different queue managers.

For more environments, do we need to add QCF for each environment in properties file. Can we use a single bindings file to connect to multiple QCFs?

If so, how do we differentiate between the environments in Java code. Do we have to pass environment name as argument while running the java code and make the necessary changes in java code to check the env, so that the messages going through java code can write up to correct queue manager.


Set up a channel table where the qmgr name is the environment name. This way you will only ever connect to a qmgr in the proper environment...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
ambidextrous
PostPosted: Mon Jun 11, 2012 8:13 pm    Post subject: Reply with quote

Newbie

Joined: 11 Jun 2012
Posts: 2

CCDT may be a good option, but we are not preferring this connection mode, but in general is there any way this can be achieved using bindings file?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jun 11, 2012 8:25 pm    Post subject: Reply with quote

Grand High Poobah

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

ambidextrous wrote:
CCDT may be a good option, but we are not preferring this connection mode, but in general is there any way this can be achieved using bindings file?


You can have multiple qmgrs in the .bindings file. I gather from your post that what you meant was really connecting to the qmgr in bindings MODE.

This just means that you need to be able to map the environment to the qmgr name. This could potentially be done by looking up the qmgr in the context by the environment name...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue Jun 12, 2012 4:55 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Why are you trying to have the same bindings file point to more than one environment?

You should not put production connection information anywhere that a development environment can get at it.

You are also completely failing to understand the point of JNDI - that absolutely everything is looked up. The name that the program uses for looking up the QCF in the JNDI should itself be looked up from properties or etc.

So yes, you absolutely can put more than one qcf in a bindings file, but they all need different names, and you need to make sure that you can control what name your application uses to look up the qcf.

And, again, you shouldn't put production information in the same file as development information. You're just asking for trouble. Particularly, it will make it easy to tell if the developer forgot to use the right name somewhere - because it won't be found.
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 » Multiple QCF in bindings file
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.