Currently in my project we are using Hibernate with plain Oracle Driver Manager as the database connection mechanism (<property name="hibernate.connection.driver_class">oracle.jdbc.OracleDriver</property> .
Now we have been asked to use XA datasource which has to be configured in the app server. Though we have two database interaction in our application we don't have a cross transaction scenario.
I believe using XA implies 2PC which will try to synchronize transaction across the database. How can I overcome this overhead while still using XA.
Also another question is regarding Transaction Manager. Is it imperative to use the transaction manager if we want to implement XA datasource. Can I do w/out transaction manager and still have XA for database communication.
Most of the XA Hibernate related examples I saw on the net use Spring. We do not use Spring. So could it be possible for you to post XA-Hibernate sample w/out using Spring.
I believe using XA implies 2PC which will try to synchronize transaction across the database. How can I overcome this overhead while still using XA.
Is this not the only reason to use an XA DataSource in the first place? If you don't have a transaction that spans more than one resource why use it at all?
I have gone through a bit of documentation on the same but have not got the clear idea of how the transaction manager interplays with XA datasource or say plain datasource in general
------------ Also another question is regarding Transaction Manager. Is it imperative to use the transaction manager if we want to implement XA datasource or plain datasource. Can I do w/out transaction manager and still use datasource for database communication. -----------