We are using Postgres 9.1.0 with Hibernate 3.2.5.
I downloaded the latest JDBC JDBC4 Postgresql Driver, Version 9.1-901 .
I set the sleep isolation property.
<property name="connection.isolation">2</property>
which means
2=READ_COMMITTED
But this gives me an error while trying to access the database.
Caused by: org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction. at org.postgresql.jdbc2.AbstractJdbc2Connection.setTransactionIsolation(AbstractJdbc2Connection.java:821) at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:103) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
If I remove the isolation level property. It is working fine. Any help would be appreciated
source share