my dog learned polymorphism*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Usage of XA vs Non-XA Driver for Transactions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Usage of XA vs Non-XA Driver for Transactions" Watch "Usage of XA vs Non-XA Driver for Transactions" New topic
Author

Usage of XA vs Non-XA Driver for Transactions

Chinababu Illa
Greenhorn

Joined: Jun 04, 2008
Posts: 23
Hi All,

I have question. It's clearly known that if we do not deal with multiple types of resources within a single transactions then we do not need XA Driver/ResourceManger (Distributed Txns), we only need non-XA Driver in these scenarios (Local transactions).

My question is, when we develop the application, there are comparatively very few situations deal with multiple types of resources that need distributed transactions (say, db operation and JMS operation in single trasanction), rest all dealing only with single transactional resource, (say, update single database) which do not need XA-Transaction. In this case, which is better way from the below options:

1) Have only XA Driver for both distributed and local transactions.
2) Have XA Diver for distributed transactions and Non-XA Driver for local transaction (Application is going to have 2 Data Sources for
single database)

Is there any performance improvement when we use 2nd option?
What is industry practise?

Thanks in advance,
Chinna
eugen grosu
Greenhorn

Joined: May 12, 2006
Posts: 4
If you use XA, the transaction manager is smart enough to decide when to use 2PC...meaning that if you only access a single resource, it won't start 2PC.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Usage of XA vs Non-XA Driver for Transactions
 
Similar Threads
Distributed Transactions
MDB - part of a transaction
Transaction: Spring2.x + Hibernate3.0 + Jboss + Multiple Databases
JTA and Container managed transactions
Deploy EJB(CMP) on WebSphere3.5.2