org.jboss.ejb.plugins.lock
Class NoLock

java.lang.Object
  |
  +--org.jboss.ejb.plugins.lock.BeanLockSupport
        |
        +--org.jboss.ejb.plugins.lock.NoLock
All Implemented Interfaces:
BeanLock

public class NoLock
extends BeanLockSupport

No locking what-so-ever 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.3.2.1 $

Revisions:

2001/08/08: billb

  1. Initial revision
Author:
Bill Burke

Fields inherited from class org.jboss.ejb.plugins.lock.BeanLockSupport
id, numMethodLocks, reentrant, refs, synched, tx, txTimeout, waiting
 
Constructor Summary
NoLock()
           
 
Method Summary
 void endTransaction(javax.transaction.Transaction transaction)
           
 void releaseMethodLock()
          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)
          Schedule(Invocation) 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, addWaiting, deadlockDetection, getId, getNumMethodLocks, getRefs, getTransaction, isCallAllowed, isMethodLocked, releaseSync, removeRef, removeWaiting, setId, setReentrant, setTimeout, setTransaction, sync
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoLock

public NoLock()
Method Detail

schedule

public void schedule(MethodInvocation mi)
              throws java.lang.Exception
Schedule(Invocation) 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 BeanLockSupport

endTransaction

public void endTransaction(javax.transaction.Transaction transaction)
Overrides:
endTransaction in class BeanLockSupport

wontSynchronize

public void wontSynchronize(javax.transaction.Transaction trasaction)
Overrides:
wontSynchronize in class BeanLockSupport

releaseMethodLock

public void releaseMethodLock()
Description copied from interface: BeanLock
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
Overrides:
releaseMethodLock in class BeanLockSupport


Copyright © 2000 The JBoss Organization. All Rights Reserved.