Posted: Thu Dec 23, 2004 8:19 am Post subject: MQ Connection pool in C++
Master
Joined: 28 Jun 2001 Posts: 249
Has anyone implemented an MQ connection pooling mechanism for C++ similar to that provided in MQ Java and MQ JMS?
I think this would involve sub-classing IMQQueueManager and implementing something like the java MQSimpleConnectionManager in C++ (which I realise is a non-trivial task).
This would be for a multi-threaded environment, and I would imagine that the main thread would create the connection pool, and that the sub-classed IMQQueueManager.connect() method would use the single connection pool with "shared connection handles" which it would dole out to the thread (actually issuing a connect if none available). When the thread issued the IMQQueueManager.disconnect(), then the handle would be returned to the pool. I guess the connection pool would need to run a timer to release connection handles after a time as well.
I'm lead to believe that the .NET classes might implement something like this under the covers, but I've not them documented as doing so, and in any case the application is C++ and not necessarily Windows based.
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