[Fwd: Re: Problem with committing in XA mode]

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Vlastimil Havranek <vlastimil(dot)havranek(at)xitee(dot)com>, List <pgsql-jdbc(at)postgresql(dot)org>
Subject: [Fwd: Re: Problem with committing in XA mode]
Date: 2009-01-19 16:26:48
Message-ID: 4974A9C8.6050302@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

(resending with attachment gzipped, original didn't reach the list due
to size limit)

Vlastimil Havranek wrote:
> Hi,
> regarding the autocommit, we do not use it in our application, we use
> the EJBs mostly with CMP, some with BMP, which are accessing several dbs
> via XA driver.
> The EJB on which it gets stuck runs with CMP.
>
> Ive found that weblogic provides some monitoring of tx, the tx was there
> in state 'comitting' but both force local and force global commit failed
> with xaexception: someDataSource: null.
>
> Ive tried all the XA related data source settings, but it didnt help.
>
> So maybe if you could modify the driver to tolerate the strange WL XA
> pattern, then I would try that one out.
>
> Anyway, thx for your great cooperation,

Ok, here's a patch to tighten up the XA state handling in the driver, in
two different ways:
1. More cases of illegal (per JTA spec) calls and calls we can't handle
because of lack of transaction interleaving are explicitly checked for,
and an error is thrown.
2. The returned command tag of PREPARE TRANSACTION/COMMIT
PREPARED/ROLLBACK PREPARED are checked, and an exception is thrown if
it's not what was expected.

This makes the XA part of the driver much more robust.

Vlastimil, can you try what this patch does to your test case? It won't
solve your problem, but you should get a more descriptive error message,
showing more clearly what WebLogic is doing. Then we can hopefully see
if there's something we can do in the driver to make it work.

I can send you a patched postgresql.jar offlist. If you need one, just
drop me a note.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

Attachment Content-Type Size
tighten-up-xa-1.patch.gz application/x-gzip 6.2 KB

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vlastimil Havranek 2009-01-19 17:08:31 Re: Problem with committing in XA mode
Previous Message Miłosz Tylenda 2009-01-19 15:35:11 Re: Support of getting generated keys in driver version 8.4devel