File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Usage of XA vs Non-XA Driver for Transactions

 
Chinababu Illa
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic