Re: Transaction Isolation level

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Oct 04 2007 - 09:19:01 EDT

  • Next message: Andrus Adamchik: "Re: DataRowStore.sendUpdateNotification NullPointerException"

    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



    This archive was generated by hypermail 2.0.0 : Thu Oct 04 2007 - 09:19:25 EDT