FileDocCategorySizeDatePackage
TxLockInterceptor.javaAPI DocJBoss 4.2.12262Fri Jul 13 21:02:26 BST 2007org.jboss.aspects.txlock

TxLockInterceptor

public class TxLockInterceptor extends Object implements org.jboss.aop.advice.Interceptor
This interceptor handles chooses an object to invoke on based on the transaction
author
Bill Burke
version
$Revision: 57186 $

Fields Summary
protected Logger
log
Logging instance
private final TransactionManager
tm
private final QueuedTxLock
lock
Constructors Summary
public TxLockInterceptor(TransactionManager tm, QueuedTxLock lock)


       
   
      this.tm = tm;
      this.lock = lock;
   
Methods Summary
public java.lang.StringgetName()

      return "TxLockInterceptor";
   
public java.lang.Objectinvoke(org.jboss.aop.joinpoint.Invocation invocation)

      Transaction tx = tm.getTransaction();
      if (tx == null) return invocation.invokeNext();

      else
      {
      }


      lock.schedule(tx, invocation);
      try
      {
         return invocation.invokeNext();
      }
      finally
      {
         lock.endInvocation(tx);
      }