|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
WMQ as Distributed Transaction Manager for ODBC and JDBC |
« View previous topic :: View next topic » |
Author |
Message
|
yashgt |
Posted: Tue Nov 11, 2014 4:03 am Post subject: WMQ as Distributed Transaction Manager for ODBC and JDBC |
|
|
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 |
|
 |
fjb_saper |
Posted: Tue Nov 11, 2014 9:10 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 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 |
|
 |
yashgt |
Posted: Tue Nov 11, 2014 11:10 pm Post subject: |
|
|
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 |
|
 |
|
|
 |
|
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
|
|
|
|