Re: Another exception (Transaction level)

From: Ole Streicher <ole-usenet-spam(at)gmx(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Cc: Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk>
Subject: Re: Another exception (Transaction level)
Date: 2003-07-25 14:15:03
Message-ID: 16161.15207.383559.782061@ebp00439.ebp.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hello Paul!

Paul Thomas writes:
> > Connection dbConn;
> > dbConn = java.sql.DriverManager.getConnection(...);
> > dbConn.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
> > dbConn.setAutoCommit(false);
> > and then I use this instance of dbConn for querys and updates (which
> > may occur concurrently at the same time).
> Concurrently? Do you mean that you a sharing one connection between
> several threads?

Yes. I didn't see a hint why this should be problematic.

> If so then that may be the cause of your problems.

How can I avoid this? Shall I establish a new connection for every
asynchronious request/update I have? Aren't they expensive?

> > Finally, I found out the same when searching the net. But, why the
> > user's manual (9.2. "Transaction Isolation") states something
> > different? I guess it should be corrected in the manual.
> FWIW, the 7.3.3 docs only mention supporting read committed and
> serialized. Which version are you using?

7.2.2 from SuSE, but my pdf documentation is of 7.3.2 (downloaded
wednesday or so). Page 141 (a4 version): "The four transaction levels
and the corresponding behavior are shown in Table 9-1".

Ciao

Ole

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Csaba Nagy 2003-07-25 14:23:44 Re: Another exception (Transaction level)
Previous Message Fernando Nasser 2003-07-25 13:58:17 Re: Another exception (Transaction level)