To get back to the more obvious:
Are you sharing the connection among all threads, or are you using a connection per thread? As you are listening for messages on the queue, you should really be using a connection per thread. Makes cleaning up a thread operation...
Seems to me like you might have been trying to read from a queue while a different thread had closed the connection, maybe after some exception? _________________ MQ & Broker admin
Posted: Thu Jun 28, 2012 1:12 pm Post subject: Re: MQCB 2012 error
Disciple
Joined: 17 Jan 2006 Posts: 167 Location: Ohio
seenutheleo wrote:
Hi Bob,
I changed my c++ application to use MQCTL/MQCB... But my MQCB returns with 2012. MQRC_ENVIRONMENT_ERROR. From documentation i understood that its related to not being able to create posix threads from my application. Is there anything i need to do on linux to allow posix threads for c++ applications?
Enabling posix threads in C++ requires changing your thread generation to use pthread.h and including a posix threading library. Depending on your compiler, this may or may not be possible.
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