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 » MQ5.3 CSD7, .NET API, COM+ distributed transaction enlisting

Post new topic  Reply to topic
 MQ5.3 CSD7, .NET API, COM+ distributed transaction enlisting « View previous topic :: View next topic » 
Author Message
drenshaw
PostPosted: Wed Sep 22, 2004 3:19 am    Post subject: MQ5.3 CSD7, .NET API, COM+ distributed transaction enlisting Reply with quote

Newbie

Joined: 22 Sep 2004
Posts: 6

Hi,

I am writing a transactional .NET application using Windows 2000 COM+ DTC for transaction coordination.

I have been following the guidance in the "WebSphere MQ Solutions in a Microsoft .NET Environment" red book. In particular the "Automatic transactions using .NET declarative transaction management" on page 297.

However, the WMQ does not appear to be being enlisted in the COM+ transactions automatically and rollbacks are not occuring as they should when an exception is thrown.

I have confirmed that a COM+ transactional context exists when all of the MQ work is done.

Now, I have looked all of the net and through these forums for people having similar problems in the past. I have not found any conclusive answer but there were suggestions that there was a difference between "client" connections and "server" connections when it came to transaction enlistment.

I am connecting to a local queue and I believe I have the WMQ client software installed so does this mean that I cannot test transaction enlistment at present?

The final production environment will be using an WMQ server hub so maybe transaction enlistment will work then. If so, how should I test it prior to deployment?

I can provide a simple example .NET application that demonstrates this problem if it might help anyone.

Thanks,
Daniel Renshaw
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Sep 22, 2004 4:21 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If you are not running your program on the same machine as the queue manager itself, or if your program has set NMQ_MQ_LIB to mqic32.dll, then you are running as a client.

If you are running as a client, you can not participate in two-phase commits.

Unless you are running the Extended Transaction Client - in which case you would have to set NMQ_MQ_LIB to mqic32XA.dll.

But I believe that the ETC doesn't support MTS transactions - so you probably can't use it for your app anyway.

So, yeah, run on the same machine as a queue manager, and link against mqm.dll, and see if you have the same problems.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
drenshaw
PostPosted: Wed Sep 22, 2004 4:31 am    Post subject: Reply with quote

Newbie

Joined: 22 Sep 2004
Posts: 6

Thanks for the response.

The queue manager is running on the same machine as the application but I'm pretty certain that I don't have the server software installed, nor do I have the extended transactional client installed.

Daniel
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Sep 22, 2004 4:40 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If the queue manager is on the same machine as your application, then that machine has the server software installed. You don't get queue managers otherwise.

So what library are you linking against?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
drenshaw
PostPosted: Wed Sep 22, 2004 7:01 am    Post subject: Reply with quote

Newbie

Joined: 22 Sep 2004
Posts: 6

Yep, you're right I do seem to have the server software installed after all. Unfortunately, this concerns me as I no longer have a possible explanation for the transaction enlistment to not work!

As I am programming with .NET I am not linking to any library as such. Instead I have a reference to the .NET API library amqmdnet.dll.

Daniel
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Sep 22, 2004 7:33 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yes yes. .NET = dynamic binding. I know that.

What is the value of NMQ_MQ_LIB?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
drenshaw
PostPosted: Thu Sep 23, 2004 8:10 am    Post subject: Reply with quote

Newbie

Joined: 22 Sep 2004
Posts: 6

I've set the NMQ_MQ_LIB environment variable to "mqm.dll" to enable server binding but I'm still not seeing enlistment in the transactions.

Daniel
Back to top
View user's profile Send private message
JasonE
PostPosted: Fri Sep 24, 2004 12:08 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

Asking the obvious, but are you using syncpoiint on your MQ operations?
Back to top
View user's profile Send private message
drenshaw
PostPosted: Fri Sep 24, 2004 1:11 am    Post subject: Reply with quote

Newbie

Joined: 22 Sep 2004
Posts: 6

I'm glad you're asking the obvious - I'm sure I'm doing something silly. However in this case I can confirm that I am using a sync point. The Put Message Options, Options property is set to 2, i.e. MQPMO_SYNCPOINT is the only option set.
Back to top
View user's profile Send private message
drenshaw
PostPosted: Fri Sep 24, 2004 1:17 am    Post subject: Reply with quote

Newbie

Joined: 22 Sep 2004
Posts: 6

EEP!!! Although I was creating a MQPutMessageOptions object and setting the options property with MQPMO_SYNCPOINT I had forgot to use the options when actually calling Put!

The operations are now being enlisted in the distributed transaction. Thanks for your help.

Daniel
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 » IBM MQ API Support » MQ5.3 CSD7, .NET API, COM+ distributed transaction enlisting
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.