| This class is holds threads awaiting the transactional lock to be free
in a fair FIFO transactional queue. Non-transactional threads
are also put in this wait queue as well. Unlike SimplePessimisticEJBLock which notifies all
threads on transaction completion, this class pops the next waiting transaction from the queue
and notifies only those threads waiting associated with that transaction. This
class should perform better than Simple on high contention loads.
Holds all locks for entity beans, not used for stateful.
All BeanLocks have a reference count.
When the reference count goes to 0, the lock is released from the
id -> lock mapping.
As of 04/10/2002, you can now specify in jboss.xml method attributes that define
methods as read-only. read-only methods(and read-only beans) will release transactional
locks at the end of the invocation. This decreases likelyhood of deadlock and increases
performance.
FIXME marcf: we should get solid numbers on this locking, bench in multi-thread environments
We need someone with serious SUN hardware to run this lock into the ground
author: Marc Fleury author: Bill Burke author: Peter Murray version: $Revision: 57209 $ |