Re: patch: tiny patch to correct stringbuffer size estimate - Mailing list pgsql-jdbc

From Paul Thomas
Subject Re: patch: tiny patch to correct stringbuffer size estimate
Date
Msg-id 20030722212940.C7343@bacon
Whole thread Raw
In response to Re: patch: tiny patch to correct stringbuffer size estimate  (Felipe Schnack <felipes@ritterdosreis.br>)
List 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   |
+------------------------------+---------------------------------------------+

pgsql-jdbc by date:

Previous
From: Fernando Nasser
Date:
Subject: Re: RFC: Removal of support for JDBC1 drivers.
Next
From: Erik Price
Date:
Subject: store JDBC SQL in Properties