Re: jdbc xa patches

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: jdbc xa patches
Дата
Msg-id 42E6E2AD.9010104@opencloud.com
обсуждение исходный текст
Ответ на Re: jdbc xa patches  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: jdbc xa patches
Список pgsql-jdbc
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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: jdbc xa patches
Следующее
От: Michael Allman
Дата:
Сообщение: Re: jdbc xa patches