Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is difference between oracle.jdbc.xa.client.OracleXADataSource and oracle.jdbc.pool.OracleDataSource

I am trying to understand the difference between XA vs Non XA JDBC datasource. Also how do I know which type and version of JDBC dtriver is used. I am currently on 10.3 weblogic and trying some tet to kill long running queries using setQueryTimeout, which isnt seem to be reliable with OracleXADataSource as it is only working the first time and not always. Sorry for this basic question but I am new to Weblogic Datasource configuration

Thanks

like image 874
user369823 Avatar asked Aug 23 '12 17:08

user369823


People also ask

What is OracleXADataSource?

A factory for XAConnection objects. An object that implements the XADataSource interface is typically registered with a JNDI service provider. For optimization purposes, we implemented 2 versions of OracleXADataSource: one for client, and one for server when used in Java Stored Procedures and in EJB.

What is XA JDBC driver?

The JDBC XA distributed transaction management classes enable you to use the IBM® Toolbox for Java™ JDBC driver within a distributed transaction. Using the XA classes to enable the IBM Toolbox for Java JDBC driver allows it to participate in transactions that span multiple data sources.


1 Answers

XA jdbc drivers are used to implement two-phase commit, meaning the two remote resources are part of the same transaction. Java specifies an implementation of this via JTA. A good reading is e.g. http://www.javaworld.com/javaworld/jw-07-2000/jw-0714-transaction.html; if you google for 'xa jdbc driver' you'll find plenty more info.

You should not use the XA driver if not necessary. I remember reading that there are some problems with them.

like image 140
Timo Hahn Avatar answered Sep 18 '22 16:09

Timo Hahn