开发者

What is Type 4 XA driver?

In our application when we create the Datasource, 开发者_如何学编程we select the

Database Name DB2

Driver: 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜