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

2

10

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

Armstrong answered 23/8, 2012 at 17:59 Comment(0)
T
9

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.

Typhoon answered 23/8, 2012 at 19:53 Comment(1)
Thanks for the comment.Any idea how do I lookup for the version of the JDBC driver associated with this XA Driver class.I looked at weblogic.jar but I am not sure how do I actually find the version and which driver is used the applicationArmstrong
W
0

To identify JDBC driver your WLS is using, go to the <domain_dir>/config/jdbc and open the data souce file, check the driver-name value in the file.

To identify the Driver version, check from which .jar is the driver being loaded (run the WLS with -verbose:class)- the name of the jar will contain the version number. Also, you can use java -jar my-jdbc-file.jar which will print the driver version. The OJDBC drivers are usually stored in a file named ojdbc6.jar or ojdbc7.jar, etc.

Wangle answered 3/10, 2013 at 0:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.