org.jboss.cache.pojo.interceptors
Class PojoFailedTxMockupInterceptor

java.lang.Object
  extended by org.jboss.cache.pojo.interceptors.AbstractInterceptor
      extended by org.jboss.cache.pojo.interceptors.PojoFailedTxMockupInterceptor
All Implemented Interfaces:
org.jboss.aop.advice.Interceptor

public class PojoFailedTxMockupInterceptor
extends AbstractInterceptor

Interceptor to mockup tx failure that resulting in rollback. User can simulate a rollback by setting the static method setRollback. Note that you will need to use setRollback for every method call, that is, it will reset itself after a rollback has been performed.

Version:
$Id: PojoFailedTxMockupInterceptor.java 5439 2008-03-15 05:40:15Z jason.greene@jboss.com $
Author:
Ben Wang

Field Summary
static boolean TX_ROLLBACK
           
 
Fields inherited from class org.jboss.cache.pojo.interceptors.AbstractInterceptor
log
 
Constructor Summary
PojoFailedTxMockupInterceptor()
           
 
Method Summary
 Object invoke(org.jboss.aop.joinpoint.Invocation in)
           
static void setTxRollback(boolean isTrue)
           
 
Methods inherited from class org.jboss.cache.pojo.interceptors.AbstractInterceptor
getCache, getInvocationContext, getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TX_ROLLBACK

public static boolean TX_ROLLBACK
Constructor Detail

PojoFailedTxMockupInterceptor

public PojoFailedTxMockupInterceptor()
Method Detail

setTxRollback

public static void setTxRollback(boolean isTrue)

invoke

public Object invoke(org.jboss.aop.joinpoint.Invocation in)
              throws Throwable
Throws:
Throwable


Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.