aspose file tools*
The moose likes JDBC and the fly likes 2 Phase Commit[My SQL] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "2 Phase Commit[My SQL]" Watch "2 Phase Commit[My SQL]" New topic
Author

2 Phase Commit[My SQL]

Asgar Ali
Greenhorn

Joined: Sep 01, 2008
Posts: 8
Hi,
I have a question. I am trying to learn how 2 phase commit works between 2 different resources, database and message queue. I am using MySql 5.1 trial version for that. DO I need to make some changes to mysql database inorder to make it work for a 2 phase commit.
Any documentation will help
Thanks
Asgar
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You'll have to your the right database engine. I think its only the InnoDB one that supports XA transactions. Other than that it should work.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Asgar Ali
Greenhorn

Joined: Sep 01, 2008
Posts: 8
Thanks, So if I create a database, will It pick up the InnoDB engine by default or I need to do some sort of configuration?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

No, the default (as I remember) is the MyISAM. The documentation will help you.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38851
    
  23
I think you are right, Paul. You write

ENGINE=InnoDB;

at the end of a table declaration, or you can probably add a similar declaration to a database creation statement.
[ October 22, 2008: Message edited by: Campbell Ritchie ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 2 Phase Commit[My SQL]