jrun.ejb.interceptors
Class ContainerManagedTransactionInterceptor

jrunx.kernel.ServiceAdapter
  |
  +--jrun.ejb.interceptors.AbstractInterceptor
        |
        +--jrun.ejb.interceptors.TransactionInterceptor
              |
              +--jrun.ejb.interceptors.ContainerManagedTransactionInterceptor
All Implemented Interfaces:
ContainerManagedTransactionInterceptorMBean, Interceptor, InterceptorMBean, javax.naming.Referenceable, java.io.Serializable, Service, ServiceMBean, TransactionInterceptorMBean, TransactionTypes

public class ContainerManagedTransactionInterceptor
extends TransactionInterceptor
implements ContainerManagedTransactionInterceptorMBean, TransactionTypes

Interceptor that interacts with the TransactionManager to begin, commit, suspend, resume, and rollback container-managed transactions. The parent interceptor facilitates the differentiation and handling of System and Application Exceptions that may mark the current Transaction (if any) for rollback only. The actual rollback and commit operations occur in this interceptor, if this interceptor is the originator of the Transaction. The suspend and resume operations similarly occur here if this interceptor encountered an exisiting transaction.

Author:
PS Neville, Paul Reilly
See Also:
Serialized Form

Fields inherited from class jrun.ejb.interceptors.TransactionInterceptor
OBJECT_NAME, tm
 
Fields inherited from class jrun.ejb.interceptors.AbstractInterceptor
container, ISFIRST_MESSAGE, ISLAST_MESSAGE, next, previous
 
Fields inherited from class jrunx.kernel.ServiceAdapter
DEFAULT_DEACTIVATED, DEFAULT_DOMAIN, DOMAIN_NAME_SEPARATOR, DOMAIN_NAME_SUFFIX, domainName, jndiBindable, LOGGER_CACHE_TIME, SCHEDULER_SERVICE, SECURITY_MANAGER, server, status, TRANSACTION_MANAGER
 
Fields inherited from interface jrun.ejb.interceptors.ContainerManagedTransactionInterceptorMBean
OBJECT_NAME
 
Fields inherited from interface jrunx.kernel.Service
INITIALIZED, STARTED, STARTING, STOPPED, STOPPING, UNINITIALIZED
 
Fields inherited from interface jrun.transaction.TransactionTypes
TX_MANDATORY, TX_NEVER, TX_NOT_SUPPORTED, TX_REQUIRED, TX_REQUIRES_NEW, TX_SUPPORTS, TX_UNKNOWN
 
Constructor Summary
ContainerManagedTransactionInterceptor(EJBContainer container)
           
 
Method Summary
 void handleTransactionException(java.lang.Exception e, EJBInvocation invocation, int txstatus, int transactionType, boolean isHomeMethod)
           
protected  java.lang.Object invokeTransactedMethod(EJBInvocation ejbInvocation, boolean isHomeMethod)
           
 void start()
          Every service other than mere data collections should start
 
Methods inherited from class jrun.ejb.interceptors.TransactionInterceptor
handleTransactionException, invokeHomeMethod, invokeObjectMethod
 
Methods inherited from class jrun.ejb.interceptors.AbstractInterceptor
getContainer, getContainerName, getEJBMetaData, getNext, getNextInterceptorName, getPrevious, getPreviousInterceptorName, setNext, setPrevious
 
Methods inherited from class jrunx.kernel.ServiceAdapter
bind, destroy, findObjectInstance, findObjectInstance, findObjectInstance, getBindToJNDI, getDeactivated, getDomainName, getDomainSearchPath, getJRunService, getLogger, getName, getParentService, getReference, getResourceManager, getServerName, getServerProperties, getStatus, init, invokeMethod, isInPartition, isPartition, lookup, postDeregister, postRegister, preDeregister, preRegister, requestServer, scheduleRunnable, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, stop, toString, unbind, unscheduleRunnable, updateStatus
 
Methods inherited from interface jrun.ejb.InterceptorMBean
getContainerName, getNextInterceptorName, getPreviousInterceptorName
 
Methods inherited from interface jrunx.kernel.ServiceMBean
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getLogger, getName, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind
 
Methods inherited from interface jrunx.kernel.Service
destroy, getStatus, init, stop, updateStatus
 

Constructor Detail

ContainerManagedTransactionInterceptor

public ContainerManagedTransactionInterceptor(EJBContainer container)
Method Detail

invokeTransactedMethod

protected java.lang.Object invokeTransactedMethod(EJBInvocation ejbInvocation,
                                                  boolean isHomeMethod)
                                           throws java.lang.Exception
Overrides:
invokeTransactedMethod in class TransactionInterceptor

handleTransactionException

public void handleTransactionException(java.lang.Exception e,
                                       EJBInvocation invocation,
                                       int txstatus,
                                       int transactionType,
                                       boolean isHomeMethod)
                                throws java.lang.Exception

start

public void start()
           throws java.lang.Exception
Description copied from class: ServiceAdapter
Every service other than mere data collections should start
Specified by:
start in interface Service
Overrides:
start in class TransactionInterceptor


Copyright � 2002 Macromedia Corporation. All Rights Reserved.