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 » Multiphase Commit » WMQ as Distributed Transaction Manager for ODBC and JDBC

Post new topic  Reply to topic
 WMQ as Distributed Transaction Manager for ODBC and JDBC « View previous topic :: View next topic » 
Author Message
yashgt
PostPosted: Tue Nov 11, 2014 4:03 am    Post subject: WMQ as Distributed Transaction Manager for ODBC and JDBC Reply with quote

Apprentice

Joined: 11 Nov 2014
Posts: 38

Hi,

We intend to use a single Queue Manager as Distributed Txn Manager for a C++ program and a Java program. The Database used by both apps is the same. The qm.ini looks like:
XAResourceManager:
Name=MYDBQA52
SwitchFile=jdbcdb2
XAOpenString=MYDBQA5,appsuqa,dbserver,toc=p
ThreadOfControl=PROCESS
XAResourceManager:
Name=MYDBQA51
SwitchFile=db2swit
XAOpenString=MYDBQA5,appsuqa,dbserver,toc=t
ThreadOfControl=THREAD

We are using different switch files for the same database and hence the same Resource Manager. The C++ application crashes when it tries to perform a MQBEGIN. The error says: External XA Transaction Participant not available [MQRC_PARTICIPANT_NOT_AVAILABLE].

When we replace the jdbc switch file with the db2swit switch file, the C++ app runs fine. But the Java app obviously fails as the switch file is for JDBC.

My suspicion is that QM stires to do the xa_open for all RMs registered with is regardless of whether or not the RM has to participate in the transaction. For that it sends the xa_open to the switch file. It assumes both switch files should be the same and when that does not turn out to be the case, it fails at xa_open.

Is there any restriction on using a JDBC switch file and an ODBC one in the same qm.ini?
Which stanza does QM use when doing an XA_Open if there are multiple stanzas?

Thanks,
Yash
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Nov 11, 2014 9:10 pm    Post subject: Reply with quote

Grand High Poobah

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

I don't quite understand your following statement:
Quote:
We intend to use a single Queue Manager as Distributed Txn Manager for a C++ program and a Java program.


Does that mean you want to have both programs bound in a single unit of work?

I would have thought that if you are using jdbc and JMS, you'd be using a J2EE transaction coordinator and not the qmgr as transaction coordinator... Or did you write your own transaction coordinator?

What exactly are you trying to do?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
yashgt
PostPosted: Tue Nov 11, 2014 11:10 pm    Post subject: Reply with quote

Apprentice

Joined: 11 Nov 2014
Posts: 38

The C++ program will write a message to a Q and also write to a DB.
The Java program will consume from the Q and also write to the DB.

So here, a C++ and Java program are sharing the same Q Manager and the same DB. For some reason, we have decided against a J2EE Transaction coordinator and have chosen to use the abilities of QM to act as Transaction coordinator.
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 » Multiphase Commit » WMQ as Distributed Transaction Manager for ODBC and JDBC
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.