Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » ejb » plugins » [javadoc | source]
org.jboss.ejb.plugins
abstract class: AbstractTxInterceptor [javadoc | source]
java.lang.Object
   org.jboss.ejb.plugins.AbstractInterceptor
      org.jboss.ejb.plugins.AbstractTxInterceptor

All Implemented Interfaces:
    Interceptor

Direct Known Subclasses:
    TxInterceptorCMT, TxInterceptorBMT, AbstractTxInterceptorBMT, MessageDrivenTxInterceptorBMT

A common superclass for the transaction interceptors.

The only important method in this class is invokeNext which is incharge of invoking the next interceptor and if an exception is thrown, it must follow the rules in the EJB 2.0 specification section 18.3. These rules specify if the transaction is rolled back and what exception should be thrown.

Field Summary
protected static final  Method ejbTimeout    A reference to javax.ejb.TimedObject#ejbTimeout
protected  TransactionManager tm    Local reference to the container's TransactionManager. 
Fields inherited from org.jboss.ejb.plugins.AbstractInterceptor:
nextInterceptor,  log,  container
Method from org.jboss.ejb.plugins.AbstractTxInterceptor Summary:
create,   invokeNext
Methods from org.jboss.ejb.plugins.AbstractInterceptor:
create,   destroy,   getContainer,   getNext,   invoke,   invokeHome,   isAppException,   setContainer,   setNext,   start,   stop
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.ejb.plugins.AbstractTxInterceptor Detail:
 public  void create() throws Exception 
 protected Object invokeNext(Invocation invocation,
    boolean inheritedTx) throws Exception 
    This method calls the next interceptor in the chain.

    All Throwables are caught and divided into two groups: application exceptions and system exceptions. Application exception are simply rethrown. System exceptions result in the transaction being marked for rollback only. If the transaction was not started by the container (i.e., it was inherited from the client) the system exception is wrapped in a TransactionRolledBack[Local]Exception.