On Oct 4, 2007, at 1:45 PM, Martin Thelian wrote:

Yes, but this would not help to avoid a possible race-condition between thread1 and another thread2. Because there is no guarantee that thread2 has not already send an SQL statement via the connection when thread1 is
reseting the transaction isolation level.

Ok, looks like you are right, and there is a possibility of a race condition between tx.commit/rollback and the user code resetting the connection policy. A workaround would be a TransactionDelegate:

* willAddConnection may set the isolation level
* didCommit/didRollback may reset it back before the connection is returned to the pool.

Do you think this will work?

Andrus



Reply via email to