|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQ or .NET thread issue |
« View previous topic :: View next topic » |
Author |
Message
|
mvcg |
Posted: Wed Jul 02, 2003 2:51 pm Post subject: MQ or .NET thread issue |
|
|
Novice
Joined: 02 Jul 2003 Posts: 11
|
Hi All: I'm new to MQ development. I'm using the IBM .NET classes to access a local MQ Series queue manager. I'm creating a .NET application, in C#, that uses Remoting to allow a web application to perform Put and Get operations to/from MQ. The Put server creates an MQQueueManager and MQQueue class instance as expected. I can then do Puts repeatedly. The problem comes when I wait any more than a minute (actually it can happen at any time). I get a result code 2018, MQRC_HCONN_ERROR. It took forever, but I may have figured out what the problem is. The following code snippet will help explain:
Public MQPut()
{
Thread.CurrentThread.Name = DateTime.Now.ToString();
this.myThreadName = Thread.CurrentThread.Name;
.
.
.
}
When the MQRC_HCONN_ERROR exception is thrown, Thread.CurrrentThread.Name returns a blank string. All other times it returns the time at which the class was instantiated (the name I gave to it). In other words, it appears that .NET is changing threads on me.
Am I missing something? Don't the .NET classes provided by IBM allow handles to be shared across threads? If not, does anyone know how to get .NET to not swap out threads, if that's what it's doing? Any other recommendations?
Any help would be greatly appreciated.
Thanks,
-Mark |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|