Bryan,

Can you elaborate on why the same thread must be used for the life of a transaction?

alex


Thompson, Bryan B. wrote:

The semantics imposed by the API signature: lock( mode )

 

Is that the thread of the caller is blocked.  This is basically the same semantics that the java.util.concurrent.Lock interface is using except that the latter does not have a lock mode.  When the lock can not be granted immediately the current thread waits.  When the lock can be granted, the thread is notified.

 

There is no constraint against reuse of a thread for executing different transactions at different times, but the same thread must be used through the life of any given transaction.  If the responsibility for executing a given transaction is handled by t1 at one moment and t2 at another moment, then all of the synchronization logic would break.

 

-bryan