Обсуждение: XA Status

Поиск
Список
Период
Сортировка

XA Status

От
"Stefan Arentz"
Дата:
Hi there,

I'm interested in leaning the status of XA support in the JDBC driver.
The FAQ says this:

 1.1. Does the driver have XA support?

 Yes, starting with the 8.1dev-403 driver XADataSource support
 is available. It is not complete in that it does not support transaction
 interleaving.

But I have of course  no idea what transaction interleaving is and
whether that would affect my application.

I basically just want to coordinate transactions either between two
seperate databases or between a database and a XA capable JMS
provider.

Will I get in trouble if I use the current driver for those situations?

 S.

Re: XA Status

От
Heikki Linnakangas
Дата:
On Tue, 13 Jun 2006, Stefan Arentz wrote:

> But I have of course  no idea what transaction interleaving is and
> whether that would affect my application.

It means that one database connection can be used for multiple
transactions at the same time, switching between the transactions. See the
JTA specification, section 3.4.4 if you want a more detailed explanation.
You can also search the archives for previous discussion about it.

Transaction interleaving is mostly useless, but it's used in some
application servers to allow a bit more concurrency without allocating a
bigger jdbc connection pool. If I remember correctly, JBoss, for example,
uses it unless you tell it not to by setting the "track-connection-by-tx"
parameter.

Assuming you are using an application server, it acts as the transaction
coordinator and there isn't anything you can do about it in the
application. Many other drivers don't support transaction interleaving
properly either (see archives), so all the application servers I've tried
have an option to work around it.

> I basically just want to coordinate transactions either between two
> seperate databases or between a database and a XA capable JMS
> provider.

It depends on your application server (or transaction manager if you
don't use one). I mainly used JOnAS for testing when I originally wrote
the driver. JBoss should work too. Someone on this list had success with
WebLogic, but only after patching the driver a bit. I think the patch
still hasn't been applied.

> Will I get in trouble if I use the current driver for those situations?

In any case, you should get an error message if it doesn't work. I
would suggest that you try it and see if it works. And please let us know
how it works, especially if it doesn't so that we can fix it!

- Heikki