JBoss API: Class EntityLockInterceptor

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
Class EntityLockInterceptor

    java.lang.Object
      |
      +--org.jboss.ejb.plugins.AbstractInterceptor
            |
            +--org.jboss.ejb.plugins.EntityLockInterceptor

All Implemented Interfaces:
  ContainerPlugin, Interceptor, Service

public class EntityLockInterceptor
extends AbstractInterceptor

The lock interceptors role is to schedule thread wanting to invoke method on a target bean

The policies for implementing scheduling (pessimistic locking etc) is implemented by pluggable locks

We also implement serialization of calls in here (this is a spec requirement). This is a fine grained notify, notifyAll mechanism. We notify on ctx serialization locks and notifyAll on global transactional locks.

WARNING: critical code, get approval from senior developers before changing.

Version:
  $Revision: 1.5.4.4 $

  Revisions:

  2001/07/30: marcf

  1. Initial revision
  2. Factorization of the lock out of the context in cache
  3. The new locking is implement as "scheduling" in the lock which allows for pluggable locks

  2001/08/07: billb

  1. Removed while loop and moved it to SimplePessimisticEJBLock where it belongs.
Author:
  Marc Fleury, Bill Burke

Field Summary
`protected EntityContainer` | `container`

Fields inherited from class org.jboss.ejb.plugins.AbstractInterceptor
`log, nextInterceptor`

Constructor Summary
`EntityLockInterceptor()`

Method Summary
`Container` | `getContainer()`
`java.lang.Object` | `invoke(MethodInvocation mi)`
`java.lang.Object` | `invokeHome(MethodInvocation mi)`
`void` | `setContainer(Container container)` This callback is set by the container so that the plugin may access it

Methods inherited from class org.jboss.ejb.plugins.AbstractInterceptor
`destroy, getNext, init, setNext, start, stop`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### container

    protected EntityContainer container

Constructor Detail

### EntityLockInterceptor

    public EntityLockInterceptor()

Method Detail

### setContainer

    public void setContainer(Container container)

  Description copied from interface: `ContainerPlugin`
  This callback is set by the container so that the plugin may access it
  Overrides:
    `setContainer` in class `AbstractInterceptor`
  Following copied from interface: `org.jboss.ejb.ContainerPlugin`
  Parameters:
    `con` - the container using this plugin

### getContainer

    public Container getContainer()

  Overrides:
    `getContainer` in class `AbstractInterceptor`

### invokeHome

    public java.lang.Object invokeHome(MethodInvocation mi)
                                throws java.lang.Exception

  Overrides:
    `invokeHome` in class `AbstractInterceptor`

### invoke

    public java.lang.Object invoke(MethodInvocation mi)
                            throws java.lang.Exception

  Overrides:
    `invoke` in class `AbstractInterceptor`

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.