|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
TWO Phase Commit using MQ as XA for Oracle DB on Windows2000 |
« View previous topic :: View next topic » |
Author |
Message
|
rk400 |
Posted: Sat Sep 06, 2003 2:57 am Post subject: TWO Phase Commit using MQ as XA for Oracle DB on Windows2000 |
|
|
Apprentice
Joined: 04 Mar 2003 Posts: 27
|
Hi,
Please let me know whether two phase commit on windows 2000 is possible for the following combination.
Widows 2000 Server
MQ Server 5.2 as XA Resource Manager
Oracle server 8i
Programming language Java
Is two phase commit on windows possible.
thanx in adv..
RK |
|
Back to top |
|
 |
kirani |
Posted: Sat Sep 06, 2003 9:01 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Yes. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
rk400 |
Posted: Mon Sep 08, 2003 11:45 pm Post subject: |
|
|
Apprentice
Joined: 04 Mar 2003 Posts: 27
|
We've written a sample program implementing 2-phase commit.
try
{
qMgr.begin();
}
catch(MQException me)
{
if((me.completionCode == me.MQCC_WARNING)||(me.reasonCode == me.MQRC_NO_EXTERNAL_PARTICIPANTS )){
}
else{
throw me;
}
}
con = qMgr.getJDBCConnection((javax.sql.XADataSource)getDataSource());
con.setAutoCommit(false);
MQQueue local_queue = mqp.openQToGet(lQueue,qManager,qMgr);
String strRcvdMsg = mqp.getMessageQ(local_queue);
PreparedStatement stmt = con.prepareStatement("INSERT INTO MSGTBL VALUES(?,?)");
stmt.setInt(1,msgseq);
stmt.setString(2,strRcvdMsg);
stmt.executeQuery();
qMgr.commit();
con.close();
}
Questions:
1. Do we need to get the connection using qmgr.getJDBCconnection() for every message.
2. Do we need to close the connection for every message.
thanx in adv
RK |
|
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
|
|
|
|