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 » General Discussion » MQConnection as a thread

Post new topic  Reply to topic
 MQConnection as a thread « View previous topic :: View next topic » 
Author Message
koami
PostPosted: Tue Jun 22, 2004 9:39 am    Post subject: MQConnection as a thread Reply with quote

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::foo()
{
bar(); //this works

}

A::bar()
{
connect to queue manager

}


int main()
{
A a;

a.foo();

}
_________________
Koami Acolatse
IBM Certified WebSphere MQ Solution Expert
koami@rs6kconsulting.com
www.rs6kconsulting.com
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Tue Jun 22, 2004 9:50 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

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.
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 » General Discussion » MQConnection as a thread
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.