In our application when we create the Datasource, we select theDatabase Name
DB2Driver
: BEA Type 4 XA DB2
But what i know is, there are only 4 types of Driver. Then what is Type 4 XA driver?
From this blog entry.
An XA transaction, in the most general terms, is a "global transaction" that may span multiple resources.
That is, a transaction running across (say) 2 databases. So, for example, insertions can be managed across those 2 databases and committed/rolled back atomically.
The "type 4" refers to a native Java JDBC driver converting directly into the database protocol. See here for more details
Type 4: All Native Java
XA: stands for Extensible Architecture which is refered mostly for a 2-phase-commit protocol - see wikipedia. Short: A standard protocol for a global transaction between one transaction coordinator and several transaction managers. Sometimes they are also called transaction monitors. It's pretty slow so should avoid it if you don't really need it. But well, at our customer we mostly need it :(
Major advantage of XA is that it can access multiple databases in one connection/transaction.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With