Posted: Tue Jun 22, 2004 9:39 am Post subject: MQConnection as a thread
Novice
Joined: 28 Apr 2004 Posts: 10 Location: San Marcos, California - USA
Is there a way for an application to connect to a Queue Manager using a thread instead of a process? meaning connection multiple times with only one connection handler.
Here is a brief description of the problem:
Inside a c++ class method if I create a thread and inside the thread if I try connecting to queue manager I get a reason code of 2059.
Instead of creating a thread if I call another member function and try connecting to queue manager it works fine.
Here is a sample code:
class A{
void foo();
void bar();
};
A::foo()
{
createthread(*this,bar); //this does not work.
}
A typical error that people get when trying to connect within threading is 2018. A 2059 is not typical, so there may be more going on with your code than you've shown.
If you search for 2018, you might get some suggestions. _________________ I am *not* the model of the modern major general.
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