JDBC Transaction Isolation level 4 - Serializable problem

Поиск
Список
Период
Сортировка
Искать

JDBC Transaction Isolation level 4 - Serializable problem

От:
Cameron Braid <cameron@datacodex.net>
Дата:
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 ?

I can't fund any specific information on the driver's features on the 
internet.  Either at jdbc.postgresql.org or through google.

Thanks,

Cameron

-- 
Any damn fool can write code that a computer can understand...
The trick is to write code that humans can understand.
[Martin Fowler http://www.martinfowler.com/distributedComputing/refactoring.pdf]



Re: JDBC Transaction Isolation level 4 - Serializable problem

От:
Oliver Jowett <oliver@opencloud.com>
Дата:
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

Re: JDBC Transaction Isolation level 4 - Serializable problem

От:
Kris Jurka <books@ejurka.com>
Дата:


On Thu, 20 Nov 2003, Oliver Jowett wrote:

> 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.
>

Recently the backend was changed to do the automatic transaction level
upgrade, so perhaps we should too.

Kris Jurka

FAQ