org.jboss.ejb.plugins.lock
Class MethodOnlyEJBLock
java.lang.Object
|
+--org.jboss.ejb.plugins.lock.BeanLockSupport
|
+--org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock
|
+--org.jboss.ejb.plugins.lock.MethodOnlyEJBLock
- All Implemented Interfaces:
- BeanLock
- public class MethodOnlyEJBLock
- extends QueuedPessimisticEJBLock
This class does not perform any pessimistic transactional locking. Only locking
on single-threaded non-reentrant beans.
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.
- Version:
- $Revision: 1.1.4.2 $
Revisions:
2001/08/08: billb
- Initial revision
- Author:
- Bill Burke
Method Summary |
void |
endTransaction(javax.transaction.Transaction transaction)
|
void |
schedule(MethodInvocation mi)
Schedule(MethodInvocation)
Schedule implements a particular policy for scheduling the threads coming in. |
void |
wontSynchronize(javax.transaction.Transaction trasaction)
|
Methods inherited from class org.jboss.ejb.plugins.lock.BeanLockSupport |
addMethodLock, addRef, getId, getNumMethodLocks, getRefs, getTransaction, isCallAllowed, isMethodLocked, releaseSync, setId, setReentrant, setTimeout, setTransaction, sync |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MethodOnlyEJBLock
public MethodOnlyEJBLock()
schedule
public void schedule(MethodInvocation mi)
throws java.lang.Exception
- Schedule(MethodInvocation)
Schedule implements a particular policy for scheduling the threads coming in.
There is always the spec required "serialization" but we can add custom scheduling in here
Synchronizing on lock: a failure to get scheduled must result in a wait() call and a
release of the lock. Schedulation must return with lock.
- Overrides:
schedule
in class QueuedPessimisticEJBLock
endTransaction
public void endTransaction(javax.transaction.Transaction transaction)
- Overrides:
endTransaction
in class QueuedPessimisticEJBLock
wontSynchronize
public void wontSynchronize(javax.transaction.Transaction trasaction)
- Overrides:
wontSynchronize
in class QueuedPessimisticEJBLock
Copyright © 2000 The JBoss Organization. All Rights Reserved.