Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

  1. Initial revision
Author:
  Bill Burke

Fields inherited from class org.jboss.ejb.plugins.lock.BeanLockSupport
`id, numMethodLocks, reentrant, refs, synched, tx, txTimeout`

Constructor Summary
`MethodOnlyEJBLock()`

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.QueuedPessimisticEJBLock
`attemptMethodLock, doSchedule, getTxLock, isTxExpired, nextTransaction, releaseMethodLock, removeRef, waitForTx`

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`

Constructor Detail

### MethodOnlyEJBLock

    public MethodOnlyEJBLock()

Method Detail

### 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`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 The JBoss Organization. All Rights Reserved.