From: Oliver Jowett <oliver@opencloud.com>
To: Michael Allman <msa@allman.ms>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: jdbc xa patches
Date: Wed, 27 Jul 2005 13:26:05 +1200
Message-ID: <42E6E2AD.9010104@opencloud.com> (raw)
In-Reply-To: <42E6D231.8090002@opencloud.com>
References: <20050726193540.M74424@yvyyl>
<42E6D231.8090002@opencloud.com>
Oliver Jowett wrote:
> Shouldn't the XAResource check the server version on construction or on
> start()/recover() to make sure that it's actually going to be able to
> use PREPARE TRANSACTION later? Or is erroring out with a syntax error at
> the point of prepare() sufficient? (I'd like to see a better error
> message there at least)
More generally: can we get XAExceptions thrown with useful messages? It
seems like there's no direct constructor that gives you both message and
error code, but the error code is a public field so you can set it after
construction before throwing.
Also, in the case where the failure is caused by another exception, we
should generally chain that exception rather than writing it to the log
writer. See how PSQLException does this for details..
There's enough meddling there that it might be worth subclassing
XAException to automate it all.. or have a helper method somewhere.
-O
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, msa@allman.ms
Subject: Re: jdbc xa patches
In-Reply-To: <42E6E2AD.9010104@opencloud.com>
References: <20050726193540.M74424@yvyyl> <42E6D231.8090002@opencloud.com> <42E6E2AD.9010104@opencloud.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox