JBoss API: Class SimplePessimisticEJBLock
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jboss.ejb.plugins.lock.BeanLockSupport | +--org.jboss.ejb.plugins.lock.SimplePessimisticEJBLock
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.
Revisions:
2001/07/29: billb
2001/08/01: marcf
2001/08/02: marcf
Field Summary | |
java.lang.Object |
lock
The actual lock object |
Fields inherited from class org.jboss.ejb.plugins.lock.BeanLockSupport |
id, numMethodLocks, reentrant, refs, synched, tx, txTimeout, waiting |
Constructor Summary | |
SimplePessimisticEJBLock()
|
Method Summary | |
protected boolean |
doSchedule(MethodInvocation mi)
doSchedule implements a particular policy for scheduling the threads coming in. |
void |
endTransaction(javax.transaction.Transaction transaction)
This is called up synchronization to notify the end of the transaction. |
java.lang.Object |
getLock()
|
void |
releaseMethodLock()
if we reach the count of zero it means the instance is free from threads (and reentrency) we wake up the next thread in the currentLock |
void |
schedule(MethodInvocation mi)
|
void |
wontSynchronize(javax.transaction.Transaction transaction)
This is called if the synchronization missed registration (Sync interceptor). |
Methods inherited from class org.jboss.ejb.plugins.lock.BeanLockSupport |
addMethodLock, addRef, deadlockDetection, getId, getNumMethodLocks, getRefs, getTransaction, isCallAllowed, isMethodLocked, releaseSync, removeRef, setId, setReentrant, setTimeout, setTransaction, sync |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.lang.Object lock
Constructor Detail |
public SimplePessimisticEJBLock()
Method Detail |
public java.lang.Object getLock()
public void schedule(MethodInvocation mi) throws java.lang.Exception
schedule
in class BeanLockSupport
protected boolean doSchedule(MethodInvocation mi) throws java.lang.Exception
public void wontSynchronize(javax.transaction.Transaction transaction)
wontSynchronize
in class BeanLockSupport
public void endTransaction(javax.transaction.Transaction transaction)
endTransaction
in class BeanLockSupport
public void releaseMethodLock()
releaseMethodLock
in class BeanLockSupport
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |