pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: pg@fastcrypt.com
To: pgsql-jdbc@postgresql.org
Subject: Re: JDBC gripe list
Date: Sun, 27 Mar 2011 11:55:58 -0500
Message-ID: <4D8F25CE020000250003BCCA@gw.wicourts.gov> (raw)

> Dave Cramer  wrote:
>  
> Adding to the list is statement timeout. I seem to recall the issue
> is we do not want to spawn a thread for each statement which seems
> to be the only way to do this. Alternatively we could use timers,
> but I presume they just spawn threads as well.
 
No, see the java.util.Timer docs:
 
http://download.oracle.com/javase/6/docs/api/java/util/Timer.html
 
Each Timer object uses one thread and can handle thousands of pending
timers.  If you're using JDBC you're on a JVM, and those all know how
to multi-thread gracefully.  A daemon thread for a group of timers
should be no big deal.
 
We had a patch submitted for this, which looked to me like it was
pretty close to committable.  I raised some concerns and was
intending to look at it again, but haven't gotten the requisite round
tuits yet.
 
-Kevin



view thread (65+ messages)  latest in thread

Message-ID: <4D8F25CE020000250003BCCA@gw.wicourts.gov>
Permalink:  ../4D8F25CE020000250003BCCA@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4D8F25CE020000250003BCCA@gw.wicourts.gov

 · 

reply

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: Kevin.Grittner@wicourts.gov, pg@fastcrypt.com
  Subject: Re: JDBC gripe list
  In-Reply-To: <4D8F25CE020000250003BCCA@gw.wicourts.gov>
  References: <4D8F25CE020000250003BCCA@gw.wicourts.gov>

* 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