Re: XA Status

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Stefan Arentz <stefan(dot)arentz(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: XA Status
Date: 2006-06-14 14:57:58
Message-ID: Pine.OSF.4.61.0606141736010.159009@kosh.hut.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

  • XA Status at 2006-06-13 14:03:26 from Stefan Arentz

Browse pgsql-jdbc by date

  From Date Subject
Next Message José Arthur Benetasso Villanova 2006-06-14 19:03:58 Using PreparedStatement to call a function
Previous Message Michael Burns 2006-06-13 17:12:31 Overwriting largeobjects to be smaller than the original