File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and the fly likes Oracle XA Datasource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Oracle XA Datasource" Watch "Oracle XA Datasource" New topic

Oracle XA Datasource

sudha swami
Ranch Hand

Joined: Apr 24, 2007
Posts: 179
I want to know when to use Oracle XA Datasource in the web application over Oracle Datasource?
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 29220

XA is for two phase commit. If you are using two different databases, you need to use an XA Datasource.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
sudha swami
Ranch Hand

Joined: Apr 24, 2007
Posts: 179
We are using only one database i.e Oracle 9i. We have webservices too. I dont know why they need Oracle XA Datasource.
Raees Uzhunnan
Ranch Hand

Joined: Aug 15, 2002
Posts: 126
If you want to do 2 different things in one unit of work ; you will need to use XA. In your case it may be invoking a webservice and updating a database.

If all your operations in a unit of work is going to a single database ; you do not need a XA driver

Sun Certified Enterprise Architect
Java Technology Blog
sudha swami
Ranch Hand

Joined: Apr 24, 2007
Posts: 179
Thanks for the info
I agree. Here's the link:
subject: Oracle XA Datasource
Similar Threads
[Error] Cannot enlist resource, transaction not active
Data source Error
Transaction Management: BMP & CMP
Getting data which doesn't belong to DataBase
Errors using Oracle XA datasource