From: | Steven Schlansker <stevenschlansker(at)gmail(dot)com> |
---|---|
To: | Dave Cramer <pg(at)fastcrypt(dot)com> |
Cc: | Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>, Radosław Smogura <rsmogura(at)softperience(dot)eu>, David Fetter <david(at)fetter(dot)org>, Sylvain Mougenot <smougenot(at)sqli(dot)com>, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Re: [SQL] JDBC Statement.setQueryTimeout : is there plan to implement this? |
Date: | 2011-12-15 17:38:48 |
Message-ID: | 0A239648-B5D6-4E58-B67B-8257AD2AA516@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc pgsql-sql |
java.util.concurrent introduces ScheduledExecutorService, which fixes a lot of the problems with java.util.Timer and introduces more features.
Specifically, it enqueues timed actions and executes them on a thread pool, providing good controls both for controlling individual 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(at)ringerc(dot)id(dot)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(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-jdbc
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
From | Date | Subject | |
---|---|---|---|
Next Message | Radosław Smogura | 2011-12-15 20:48:43 | Re: Re: [SQL] JDBC Statement.setQueryTimeout : is there plan to implement this? |
Previous Message | the6campbells | 2011-12-15 16:02:13 | Re: getTables not returning 10 columns etc |
From | Date | Subject | |
---|---|---|---|
Next Message | Radosław Smogura | 2011-12-15 20:48:43 | Re: Re: [SQL] JDBC Statement.setQueryTimeout : is there plan to implement this? |
Previous Message | Dave Cramer | 2011-12-15 14:17:35 | Re: Re: [SQL] JDBC Statement.setQueryTimeout : is there plan to implement this? |