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 IBM MQ Support » TWO Phase Commit using MQ as XA for Oracle DB on Windows2000

Post new topic  Reply to topic
 TWO Phase Commit using MQ as XA for Oracle DB on Windows2000 « View previous topic :: View next topic » 
Author Message
rk400
PostPosted: Sat Sep 06, 2003 2:57 am    Post subject: TWO Phase Commit using MQ as XA for Oracle DB on Windows2000 Reply with quote

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
View user's profile Send private message
kirani
PostPosted: Sat Sep 06, 2003 9:01 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
rk400
PostPosted: Mon Sep 08, 2003 11:45 pm    Post subject: Reply with quote

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
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 IBM MQ Support » TWO Phase Commit using MQ as XA for Oracle DB on Windows2000
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.