Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Request to check isolation level before throwing exception



I am using atomikos 3.5.6. with Postgres 8.4 and have ran into the following
problem: Cannot change transaction isolation level in the middle of a
transaction. Due to the way that Atomikos manages the Pool of XA
connections, I cannot prevent setTransactionIsolation from being called in
the middle of transactions. I would like to propose a simple fix for this
issue. The setTransactionIsolation method should check the current isolation
level before throwing an exception.

Proposed fix in AbstractJdbc2Connection.java:

public void setTransactionIsolation(int level) throws SQLException
{

       // check current level before proceeding
        if (level == getTransactionIsolation()) {
            return;
        }

      ......

}


I have tested this patch in my environment and it fixed the problem. Is it
possible to get this change committed to the main build?

Thanks,
Ben Weber


Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group