Java threads and the JDBC driver

From: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Java threads and the JDBC driver
Date: 1998-09-14 13:05:16
Message-ID: l03110704b222c3e19580@[147.233.159.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

As I understand it, the JDBC driver is not thread safe.

I am trying to figure out how much synchronization I need.

Is it safe to use separate ResultSets that originate from the same
Connection object concurrently? That is, lock the connection object, create
and perform the query into a new ResultSet, unlock the connection, and
proceed to use the ResultSet? If I do that, other threads may be issuing
queries while I'm still looping on the ResultSet.

It's supposed to be OK. But is it?

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Peter T Mount 1998-09-14 18:15:24 Re: [INTERFACES] Java threads and the JDBC driver
Previous Message Eric H. Buschelmann 1998-09-14 02:56:03 Thanks