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 » IBM MQ API Support » MQRC_HCONN_ERROR

Post new topic  Reply to topic
 MQRC_HCONN_ERROR « View previous topic :: View next topic » 
Author Message
Amazone
PostPosted: Mon Nov 07, 2005 2:38 am    Post subject: MQRC_HCONN_ERROR Reply with quote

Novice

Joined: 17 Oct 2005
Posts: 14

Hi!

I've made a windows service in C# that allow me to duplicate message betwen file, using thread and MTS, on a server binding connection.

I've a MQRC_HCONN_ERROR, and i don't know how to solve it.

I've triend to close my connection, and open it in order to have a stable connection, but that not work.

My code looks this :

Code:
Transaction(TransactionOption.Supported)]
public class WmqComponent : ServicedComponent
{
 private const int openInOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_FAIL_IF_QUIESCING;
 private const int openOutOptions = MQC.MQOO_OUTPUT | MQC.MQOO_INQUIRE |MQC.MQOO_FAIL_IF_QUIESCING;


 public void Start(string qmName, string inQueueName, ArrayList outQueueNames, ArrayList extQueues, string logFileName)
 {
  try
  {
   if (mqQMgr==null || !mqQMgr.IsConnected)
   {
    MQEnvironment.Channel  = null;
    MQEnvironment.Hostname = null;
    mqQMgr = new MQQueueManager(qmName,MQC.MQCNO_HANDLE_SHARE_NONE );
    myInQueue = mqQMgr.AccessQueue(inQueueName, openInOptions);
   }
  }
  catch (Exception e)
  {
   if ((myInQueue != null) && myInQueue.IsOpen)
    myInQueue.Close();
   if (mqQMgr != null)
    mqQMgr.Disconnect();
  }
 }
}



PS : i'm french, sorry for my english
Back to top
View user's profile Send private message Visit poster's website
raja_no_1
PostPosted: Mon Nov 07, 2005 8:56 am    Post subject: Reply with quote

Apprentice

Joined: 05 Sep 2005
Posts: 34

You have said that "you want to duplicate mesg in a file" .

Can you describe what is it that you want your program to do?
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Nov 07, 2005 9:33 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Quote:
MQRC_HCONN_ERROR,
Which method call is throwing that?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
fjb_saper
PostPosted: Mon Nov 07, 2005 2:01 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Could it be because you are trying to use the handle from a different thread whereas you specified share none ?

Code:
mqQMgr = new MQQueueManager(qmName,MQC.MQCNO_HANDLE_SHARE_NONE );


You are only creating a handle in case none exists or the qmgr isn't yet defined...

Enjoy
Les francais parlent aux francais...
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » MQRC_HCONN_ERROR
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.