|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQRC_HCONN_ERROR |
« View previous topic :: View next topic » |
Author |
Message
|
Amazone |
Posted: Mon Nov 07, 2005 2:38 am Post subject: MQRC_HCONN_ERROR |
|
|
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 |
|
 |
raja_no_1 |
Posted: Mon Nov 07, 2005 8:56 am Post subject: |
|
|
 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 |
|
 |
wschutz |
Posted: Mon Nov 07, 2005 9:33 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Which method call is throwing that? _________________ -wayne |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Nov 07, 2005 2:01 pm Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
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
|
|
|
|