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 Java / JMS » URGENT HELP US:Handling 2-phase commit in java

Post new topic  Reply to topic
 URGENT HELP US:Handling 2-phase commit in java « View previous topic :: View next topic » 
Author Message
rk400
PostPosted: Tue Sep 16, 2003 9:54 pm    Post subject: URGENT HELP US:Handling 2-phase commit in java Reply with quote

Apprentice

Joined: 04 Mar 2003
Posts: 27

Hi ,

In MQ System Administration manual chapter 14 following is the list of XA complaint relational databases.

Table 12. XA-compliant relational databases

MQSeries product DB2 Oracle Sybase

MQSeries for Windows NT Yes No Yes

We have win2k server with MQ server 5.2, Oracle server 8.1.7 environment. Our application is written in java and we are using mq classes for java version 5.2.2.

We downloaded mqdb2log.java sample and changed it to work for oracle.

oracle.jdbc.xa.client.OracleXADataSource myDataSource =
new oracle.jdbc.xa.client.OracleXADataSource();
myDataSource.setUser("TEST");
myDataSource.setPassword("TEST");
myDataSource.setURL("jdbc:oracle:thin:@172.0.7.41:1521:"+dbName);
jdbcConn = qMgr.getJDBCConnection(myDataSource);
try
{qMgr.begin(); }
catch(MQException me)
{
if((me.completionCode == me.MQCC_WARNING)||(me.reasonCode == me.MQRC_NO_EXTERNAL_PARTICIPANTS ))
{}
else{ throw me;}
}
MQPutMessageOptions pmo = new MQPutMessageOptions();
pmo.options = pmo.options | MQC.MQPMO_SYNCPOINT;
myQueue.put(myMessage, pmo);
Statement stmt = jdbcConn.createStatement();
try { int rowsUpdated = stmt.executeUpdate(runShow);
} catch (java.lang.Exception ex) {
validStatement = false;
}
stmt.close();
qMgr.commit();}
else {
qMgr.backout();}

We have configured oralce as per the system administration manual. During testing we found that the database is commited in case of backout.

Now we have two questions:

1. Is 2-phase commit supported on win2k server and oracle 8i.(MQ as XA)
(Referring to the chapter 14 of the manual).

2. Did we miss out anything in the program.

Please Please help us in this.

Thanx a lot.
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 » IBM MQ Java / JMS » URGENT HELP US:Handling 2-phase commit in java
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.