Re: jdbc xa support

Поиск
Список
Период
Сортировка
Искать
От
Oliver Jowett
Тема
Re: jdbc xa support
Дата
Msg-id
42E07DDA.7080103@opencloud.com
Ответ на
Re: jdbc xa support (Michael Allman)
Список
Дерево обсуждения
jdbc xa support Michael Allman <msa@allman.ms>
Re: jdbc xa support Dave Cramer <pg@fastcrypt.com>
Re: jdbc xa support Heikki Linnakangas <hlinnaka@iki.fi>
Re: jdbc xa support Michael Allman <msa@allman.ms>
Re: jdbc xa support Heikki Linnakangas <hlinnaka@iki.fi>
Re: jdbc xa support Michael Allman <msa@allman.ms>
Re: jdbc xa support Oliver Jowett <oliver@opencloud.com>
Re: jdbc xa support Michael Allman <msa@allman.ms>
Re: jdbc xa support Oliver Jowett <oliver@opencloud.com>
Re: jdbc xa support Michael Allman <msa@allman.ms>
Re: jdbc xa support Oliver Jowett <oliver@opencloud.com>
Re: jdbc xa support Michael Allman <msa@allman.ms>
Re: jdbc xa support Oliver Jowett <oliver@opencloud.com>
Re: jdbc xa support Michael Allman <msa@allman.ms>
Re: jdbc xa support Oliver Jowett <oliver@opencloud.com>
Re: jdbc xa support Michael Allman <msa@allman.ms>
Re: jdbc xa support Michael Allman <msa@allman.ms>
Re: jdbc xa support Heikki Linnakangas <hlinnaka@iki.fi>
Re: jdbc xa support Michael Allman <msa@allman.ms>
Re: jdbc xa support Michael Allman <msa@allman.ms>
Re: jdbc xa support Heikki Linnakangas <hlinnaka@iki.fi>
Re: jdbc xa support Michael Allman <msa@allman.ms>
Re: jdbc xa support Heikki Linnakangas <hlinnaka@iki.fi>
Re: jdbc xa support Michael Allman <msa@allman.ms>
Re: jdbc xa support Oliver Jowett <oliver@opencloud.com>
Re: jdbc xa support Oliver Jowett <oliver@opencloud.com>
Re: jdbc xa support Michael Allman <msa@allman.ms>
Michael Allman wrote:

> The C version takes an argument specifying the maximum number of xids to 
> recover.  The Java version does not.

That's at least partly because the C version makes the caller allocate 
the array.

>  Without this information, the Java 
> version not only looks silly but doesn't make a lot of sense either.  

It seems ok to me -- it puts the burden for selecting a suitable batch 
size on the resource rather than the TM, but that's six of one, half a 
dozen of the other. That also means the RM can generate the array at 
whatever size is convenient, rather than having to internally buffer if 
it retrieves xids in some large block size than the TM selects.

It certainly doesn't make it more or less stateful, so I still don't 
understand your original objection.

> For example, how many recovered xids should we return on the first call 
> to recover()?

For our JDBC implementation? Set a fetchsize on your query to something 
reasonable -- perhaps 500? -- and return up to that many Xids per call 
until you hit the end of the resultset, then return empty arrays 
thereafter until a new scan starts.

> Anyway, do you think my implementation of the recover() method violates 
> the JTA spec?

The code in pgjdbcxa-20050721.jar appears to violate the spec, as you 
completely ignore the flags argument. You need to track the recovery 
scan state even if you decide to return all Xids in one array, because 
subsequent calls shouldn't return those Xids again until a new scan is 
started, per the API docs.

-O
В списке pgsql-jdbc по дате отправления
От: Michael Allman
Дата:
Сообщение: Re: jdbc xa support
От: Michael Allman
Дата:
Сообщение: Re: jdbc xa support
FAQ