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 Installation/Configuration Support » How to connect to Multi-instance QMGR NOT with CCDT?

Post new topic  Reply to topic
 How to connect to Multi-instance QMGR NOT with CCDT? « View previous topic :: View next topic » 
Author Message
issac
PostPosted: Thu Apr 14, 2011 12:59 am    Post subject: How to connect to Multi-instance QMGR NOT with CCDT? Reply with quote

Disciple

Joined: 02 Oct 2008
Posts: 158
Location: Shanghai

Hello,

I've figured out how to do it with a CCDT file. But how to connect to a remote Multi-Instance QMGR with the hostname \ port \ channel configs?

I want the client to be able to auto-reconnect once the standby QMGR is activated.

We're trying not to make any change to our existing app and wish to make usage of the Multi-Instance feature. Please help, thanks!
_________________
Bazinga!
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Apr 14, 2011 1:09 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Why would you want to do this? Apart from the obvious conclusion that you may want non-WMQ V7.0.1 clients to connect to an MI queue manager?

Presumably you have an application that does not use a CCDT so unless the application can pick up changes to the hostname etc. dynamically (unlikely?) the only way I can see to achieve it is infrastructurally - create a DNS name and flip the values within it when fail-over occurs.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
issac
PostPosted: Thu Apr 14, 2011 1:44 am    Post subject: Reply with quote

Disciple

Joined: 02 Oct 2008
Posts: 158
Location: Shanghai

It's coded like this:

variables including hostname & port are received by parsing a properties file.

So we can change hostname & port values, but we're not likely to change to use CCDT. I'm wondering if IM supports connecting by hostname & port? Is CCDT the only way that auto-reconnection can be possible?

Code:

protected MQQueueConnection connectToQMGR(RuntimeRegistryDTO apDto) throws JMSException {
      // setup JMS connection
      MQQueueConnectionFactory cf = new MQQueueConnectionFactory();
      cf.setHostName(apDto.hostname);
      if(apDto.port >0)
         cf.setPort(apDto.port);
      else
         DevLog.warn("PORT value is invalid and ignored for JMS config.");
      cf.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
      cf.setQueueManager(apDto.qmgr);
      cf.setChannel(apDto.channel);
      cf.setCCSID(apDto.ccsid);
      MQQueueConnection connection = (MQQueueConnection) cf.createQueueConnection();
      return connection;
   }

_________________
Bazinga!
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Apr 14, 2011 1:48 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Auto-reconnection is something that needs to be coded into the client application - unless you're using WMQ V7.0 client code.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
issac
PostPosted: Thu Apr 14, 2011 1:57 am    Post subject: Reply with quote

Disciple

Joined: 02 Oct 2008
Posts: 158
Location: Shanghai

Would you please explain what's WMQ V7.0 client code please?

I can make changes to the code and switch to CCDT if I have to. But I just don't believe MI doesn't support to connect with a token consisted of hostnames and ports, like "MYHOST1(1414),MYHOST2(1414)". Nowhere documents CCDT is the only way, and nowhere provides any example other than CCDT.

On this page
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.amqzag.doc/fa70156_.htm

it says the requirement to use auto-reconnection is :
JMS (JSE, and Java EE client container and managed containers)

I think my application qualifies JSE well, and it doesn't say "JMS connecting by CCDT"
_________________
Bazinga!
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Apr 14, 2011 2:13 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

WMQ V7.0 client code is the 'new' code base provided with that version, the code base that contains all the bells-and-whistles such as full-duplex and client auto-reconnection (the latter was something that had to be handled by the client application).

What you have to consider is that by not using a CCDT is that you are losing the flexibility and automation of what you want to do. There is a world of difference between reconnection and a new connection.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Apr 14, 2011 2:18 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

You need to distinguish between the IBM auto-reconnect feature of WMQ v7 client (which is transparent to the application), and designing an application (for any version of MQ) which can re-connect to the same or to alternate hostnames if the connection breaks.

A CCDT just supplies values, it is possible to supply the same values via MQI parameters. IBM's auto-reconnect does not work with Java apps anyway (quite a restriction!).
Back to top
View user's profile Send private message
issac
PostPosted: Thu Apr 14, 2011 2:30 am    Post subject: Reply with quote

Disciple

Joined: 02 Oct 2008
Posts: 158
Location: Shanghai

Aha! I've figured it out. Connecting as an ordinary JSE applications is well supported. Perhaps InfoCenter writers thought it hardly worthwhile to create an example for.

The answer is here:

Quote:

The standby instance of a multi-instance queue manager is typically at a different network address to the active instance. Include the network addresses of both the instances in the client connection definition table (CCDT). Either provide a list of network addresses for the CONNAME parameter, or define multiple rows for the queue manager in the CCDT.

_________________
Bazinga!
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 Installation/Configuration Support » How to connect to Multi-instance QMGR NOT with CCDT?
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.