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?