Re: JDBC Transaction Isolation level 4 - Serializable problem - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: JDBC Transaction Isolation level 4 - Serializable problem
Date
Msg-id 20031120053057.GA8429@opencloud.com
Whole thread Raw
In response to JDBC Transaction Isolation level 4 - Serializable problem  (Cameron Braid <cameron@datacodex.net>)
Responses Re: JDBC Transaction Isolation level 4 - Serializable problem
List 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

pgsql-jdbc by date:

Previous
From: Cameron Braid
Date:
Subject: JDBC Transaction Isolation level 4 - Serializable problem
Next
From: "Andrew Lazarus"
Date:
Subject: Can't get JBuilder 9 design mode to work