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 » COM+ (Transaction) & C#

Post new topic  Reply to topic
 COM+ (Transaction) & C# « View previous topic :: View next topic » 
Author Message
dletien
PostPosted: Wed Apr 23, 2003 7:08 pm    Post subject: COM+ (Transaction) & C# Reply with quote

Newbie

Joined: 30 Aug 2002
Posts: 9
Location: Chicago

I'm trying to use a COM+ component as a transaction coordinator for MQ. In order to achieve this I have developed the following classes (in C#) using MQAX lib


[Attribute (Transaction.Required)]

...

session = new MQSessionClass();
qmgr = (MQQueueManager)session.AccessQueueManager(qmgrname);
msg = (MQMessage)session.AccessMessage();
int options = (int)MQ.MQOO_OUTPUT;

queue = (MQQueue)qmgr.AccessQueue(queuename, options, "", "", "");
msg.WriteString(msgtxt);

MQPutMessageOptions putoptions = (MQPutMessageOptions)session.AccessPutMessageOptions();

putoptions.Options = (int)MQ.MQPMO_SYNCPOINT;

queue.Put(msg, putoptions);

ContextUtil.SetComplete();


}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());

ContextUtil.SetAbort();
}


the transaction monitor instanciates the COM+ object with within a transaction. However, I still get a 2354 error; according to the doc. this may comes from a DTC timeout. I changed it and set it up to 10s(!) but still get the error

Any idea?

Didier
Back to top
View user's profile Send private message MSN Messenger
msantos007
PostPosted: Fri Dec 30, 2005 5:00 am    Post subject: Reply with quote

Voyager

Joined: 20 Dec 2004
Posts: 78

http://www-1.ibm.com/support/docview.wss?rs=171&context=SSFKSJ&q1=XA+DTC&uid=swg21159392&loc=en_US&cs=utf-8?=en
_________________
Maximiliano R. A. Santos
IBM Websphere MQ V6.0 Certified System Administrator
IBM Websphere MQ V5.3 Certified Solution Developer
Back to top
View user's profile Send private message MSN Messenger
msantos007
PostPosted: Fri Dec 30, 2005 5:09 am    Post subject: Reply with quote

Voyager

Joined: 20 Dec 2004
Posts: 78

I found this also...
it says I must enable XA Transactions on DTC

http://www-1.ibm.com/support/docview.wss?rs=850&uid=swg27006838

I tried and it worked...
_________________
Maximiliano R. A. Santos
IBM Websphere MQ V6.0 Certified System Administrator
IBM Websphere MQ V5.3 Certified Solution Developer
Back to top
View user's profile Send private message MSN Messenger
jefflowrey
PostPosted: Fri Dec 30, 2005 5:28 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

But you're answering a question two years old...
_________________
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 » COM+ (Transaction) & C#
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.