Re: Re: [SQL] JDBC Statement.setQueryTimeout : is there plan to implement this?

Поиск
Список
Период
Сортировка
От Steven Schlansker
Тема Re: Re: [SQL] JDBC Statement.setQueryTimeout : is there plan to implement this?
Дата
Msg-id 0A239648-B5D6-4E58-B67B-8257AD2AA516@gmail.com
обсуждение исходный текст
Ответ на Re: Re: [SQL] JDBC Statement.setQueryTimeout : is there plan to implement this?  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-jdbc
java.util.concurrent introduces ScheduledExecutorService, which fixes a lot of the problems with java.util.Timer and
introducesmore features. 

Specifically, it enqueues timed actions and executes them on a thread pool, providing good controls both for
controllingindividual tasks (canceling) and the entire pool (shutting down cleanly / immediately) 

It might be a good fit for implementing timeouts.

On Dec 15, 2011, at 6:17 AM, Dave Cramer wrote:

> Craig,
>
> That is the current implementation. What do you suggest as a more
> robust implementation ?
>
> Dave Cramer
>
> dave.cramer(at)credativ(dot)ca
> http://www.credativ.ca
>
>
>
> On Thu, Dec 15, 2011 at 9:02 AM, Craig Ringer <ringerc@ringerc.id.au> wrote:
>> On 12/15/2011 07:29 PM, Radosław Smogura wrote:
>>>
>>> Long, long time ago I've sent implementation with timers, you need to
>>> search archive If you need this.
>>
>>
>> If it was ages ago, you probably used java.util.Timer, right?
>>
>> java.util.Timer is not suitable for use in a JDBC driver because it doesn't
>> do any exception handling on the timer thread, it's subject to congestion on
>> the timer thread, and it offers no way for the driver to control the timer
>> thread to cleanly shut it down during unload. It's unusable in app servers
>> and not really a great idea anywhere that needs to be robust and
>> long-running.
>>
>> --
>> Craig Ringer
>>
>>
>> --
>> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-jdbc
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc


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

Предыдущее
От: the6campbells
Дата:
Сообщение: Re: getTables not returning 10 columns etc
Следующее
От: Radosław Smogura
Дата:
Сообщение: Re: Re: [SQL] JDBC Statement.setQueryTimeout : is there planto implement this?