Re: JDBC Transaction Isolation level 4 - Serializable problem

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Cameron Braid <cameron(at)datacodex(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JDBC Transaction Isolation level 4 - Serializable problem
Date: 2003-11-20 05:30:59
Message-ID: 20031120053057.GA8429@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Thu, Nov 20, 2003 at 02:53:34PM +1000, Cameron Braid wrote:
> I can't seem to get the JDBC driver to accept serializable transaction
> isolation levels.
>
> Does the driver support it ?
>
> I have tried with pg73jdbc1.jar, pg73jdbc2.jar, pg73jdbc2ee.jar,
> pg73jdbc3.jar and devpgjdbc3.jar.
>
> The error that I am getting is :
>
> org.postgresql.util.PSQLException: Transaction isolation level 4 is not
> supported.
> at
> org.postgresql.jdbc1.AbstractJdbc1Connection.setTransactionIsolation(AbstractJdbc1Connection.java:1414)
>
> If this is the case (that it's not supported) are there plans to
> implement it ?

Level 4 is Connection.TRANSACTION_REPEATABLE_READ according to my javadoc.
TRANSACTION_SERIALIZABLE is 8 and should be supported.

There was some discussion about whether the driver should use the
next-higher level rather than failing in this case but I think the
conclusion was it's better to only set the levels that are directly
supported by the backend (READ_COMMITTED and SERIALIZABLE), and that the
application can upgrade the level it requests if needed based on querying
the driver's DatabaseMetaData.

-O

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Andrew Lazarus 2003-11-20 05:35:46 Can't get JBuilder 9 design mode to work
Previous Message Cameron Braid 2003-11-20 04:53:34 JDBC Transaction Isolation level 4 - Serializable problem