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 API Support » Retrieving current hConn

Post new topic  Reply to topic
 Retrieving current hConn « View previous topic :: View next topic » 
Author Message
fitzcaraldo
PostPosted: Sun Jul 06, 2003 8:29 pm    Post subject: Retrieving current hConn Reply with quote

Voyager

Joined: 05 May 2003
Posts: 98

Hello,

I'm using a third party MQ based file transfer product on HPUX. This product can invoke user developed Exits (in C) at various points in the transfer.

For various reasons, I would like to have access to the hConn in the Exit but this is not explicitly passed as a parameter. What is passed is the queue manager name and I can usually do an MQCONN using this queue manager name to retrieve the already connected handle.

There are circumstances however where this name is actually a Queue Manager Alias name rather than the real queue manager - and this doesn't work with MQCONN (2058).

I can't just use a NULL QMgr name in MQCONN as there are multiple queue managers on the machine and I don't necessarily want the default. (Indeed, this is the reason the QMgr Alias is used in the first place)

Is there any way you folks can think of to either get the hConn or resolve the Alias to the real queue manager name?

Thanks
Back to top
View user's profile Send private message
tillywern
PostPosted: Tue Jul 08, 2003 2:54 pm    Post subject: IPCs and connection pools Reply with quote

Centurion

Joined: 28 Jan 2003
Posts: 109
Location: Colorado

Sounds like a connection pool. Well the Hconn is really just and address... So far as I know. And since in C you can publish an address and access it directly you might be able to create a connection pool that is used by multiple programs to manage object handles.

I must admit that I haven't done this in C/C++. From my perspecive using a handle for more than one program is risky since MQ manages commit points based, at lease somewhat, on creation and termination of a handle.

If you were running a multithreaded application that was all written by you I would say that writing a connection pool would be a good way to avoid all the overhead of MQCONN and the other object handle management functions.

However using a connection handle that is published to you by a third party vendor seems a little scarey. I would create and exit that registers the results stored in the handel variables to a central location... File, database, shared memory segment, etc....

Hope this helps a bit.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
leongor
PostPosted: Tue Jul 08, 2003 11:28 pm    Post subject: Reply with quote

Master

Joined: 13 May 2002
Posts: 264
Location: Israel

IMHO HConn is a reference, not an address. I don't see any way you can get HConn by Qmgr alias name.
You can run your own table which resolves Qmgr alias to real Qmgr name.
_________________
Regards.
Leonid.

IBM Certified MQSeries Specialist.
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 API Support » Retrieving current hConn
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.