From: | Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk> |
---|---|
To: | "pgsql-jdbc (at) postgresql (dot) org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: patch: tiny patch to correct stringbuffer size estimate |
Date: | 2003-07-22 20:29:40 |
Message-ID: | 20030722212940.C7343@bacon |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On 22/07/2003 17:36 Felipe Schnack wrote:
> Looking at this case I don't think they are unnecessary. But I would
> like to just raise some questions for clarification
> - The JDBC spec doesn't say these objects should be used in a
> thread-safe way? What I mean: your application/container shouldn't use a
> single PreparedStatement in multiple threads)... I think I saw this
> somewhere, but I might be wrong
> - Maybe the unnecessary synch'ing is the one stringbuffer does
> internally?
>
Some databases might not even like sharing a connection between threads (I
know is is true for ODBC implemenations) so best practice would never see
synch'ing to be neccessary. OTOH, synchronization does not cause much of a
performance hit on modern JVMs (according to developer works).
--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants |
http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+---------------------------------------------+
From | Date | Subject | |
---|---|---|---|
Next Message | Erik Price | 2003-07-22 20:57:20 | store JDBC SQL in Properties |
Previous Message | Fernando Nasser | 2003-07-22 19:33:10 | Re: RFC: Removal of support for JDBC1 drivers. |