org.springframework.jee.transaction
Class TransactionalMetadata

java.lang.Object
  extended by org.springframework.jee.inject.Jsr250Metadata
      extended by org.springframework.jee.intercept.InterceptionMetadata
          extended by org.springframework.jee.transaction.TransactionalMetadata
Direct Known Subclasses:
EjbInjectionMetadata

public class TransactionalMetadata
extends InterceptionMetadata

Metadata for a transactional component such as an EJB. Adds transaction management to DI and interception capability.

Author:
Rod Johnson, Costin Leau

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.jee.intercept.InterceptionMetadata
InterceptionMetadata.InterceptorExclusion
 
Field Summary
 
Fields inherited from class org.springframework.jee.inject.Jsr250Metadata
KEY
 
Constructor Summary
TransactionalMetadata(DeploymentUnitMetadata dum, java.lang.String name, java.lang.Class<?> componentClass)
           
 
Method Summary
 void addApplicationCheckedException(java.lang.Class<? extends java.lang.Exception> exception)
          Add application exception metadata.
protected  void addComponentContractInterceptors(org.springframework.aop.framework.ProxyFactory pf)
          Add interceptors that apply the component contract--such as EJB transaction behaviour.
 void addTransactionalMethod(java.lang.reflect.Method methodOnClass, TransactionAttribute txAttribute)
          Add transactional method metadata.
protected  org.springframework.transaction.interceptor.DefaultTransactionAttribute copyEjbTxAttribute(TransactionAttribute ejbTxAttribute, org.springframework.transaction.interceptor.DefaultTransactionAttribute springTxAttribute)
          Sets the given Spring transaction definition according to the passed in ejb3 attribute.
protected  java.util.List<java.lang.Class<? extends java.lang.Exception>> getApplicationCheckedExceptions()
           
protected  java.util.Map<java.lang.reflect.Method,TransactionAttribute> getTransactionalMethodAttributes()
           
 boolean isTransactional()
           
 void setTransactional(boolean transactional)
           
 
Methods inherited from class org.springframework.jee.intercept.InterceptionMetadata
addAspectJAdvisors, addBusinessInterface, addJeeInterceptors, addJeeInterceptors, addSelfInterceptor, addSpringAopAdvisors, addSuperInterceptors, createProxyIfNecessary, createProxyIfNecessary, customizeProxyConfig, findSuperAroundInvokes, getBusinessInterfaces, getExclusion, getInterceptorMetadata, getInterceptorOrder, invokeLifecycleMethods, invokePostConstructAndRegisterShutdownHook, isExcludedAsBusinessInterfaceOnAutodetect, registerInterceptorMetadata, registerInterceptorOrder, setComponentContext, setExcludeClassInterceptors, setExcludeDefaultInterceptors, setSelfInterceptorMethod
 
Methods inherited from class org.springframework.jee.inject.Jsr250Metadata
addInjection, applyInjections, getBeanDefinition, getBeanDefinitionRegistry, getComponentClass, getComponentContext, getComponentName, getDeploymentUnitMetadata, getInjections, getLifecycleEventCallbackMethod, getUniqueInstanceOfType, inject, injectAndPostConstruct, invokeLifecycleMethod, invokeLifecycleMethod, refresh, registerLifecycleEventCallbackMethod, resolve, resolveByType, setBeanDefinition, setComponentContext, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TransactionalMetadata

public TransactionalMetadata(DeploymentUnitMetadata dum,
                             java.lang.String name,
                             java.lang.Class<?> componentClass)
Parameters:
name -
componentClass -
Method Detail

addComponentContractInterceptors

protected void addComponentContractInterceptors(org.springframework.aop.framework.ProxyFactory pf)
Description copied from class: InterceptionMetadata
Add interceptors that apply the component contract--such as EJB transaction behaviour.

Overrides:
addComponentContractInterceptors in class InterceptionMetadata
Parameters:
pf - ProxyFactory used to create proxy

copyEjbTxAttribute

protected org.springframework.transaction.interceptor.DefaultTransactionAttribute copyEjbTxAttribute(TransactionAttribute ejbTxAttribute,
                                                                                                     org.springframework.transaction.interceptor.DefaultTransactionAttribute springTxAttribute)
Sets the given Spring transaction definition according to the passed in ejb3 attribute. Required for the null case of annotation.

Parameters:
ejbTxAttribute -
springTxAttribute -

addTransactionalMethod

public void addTransactionalMethod(java.lang.reflect.Method methodOnClass,
                                   TransactionAttribute txAttribute)
Add transactional method metadata.

Parameters:
methodOnClass -
txAttribute -

addApplicationCheckedException

public void addApplicationCheckedException(java.lang.Class<? extends java.lang.Exception> exception)
Add application exception metadata.

Parameters:
exception -

getApplicationCheckedExceptions

protected java.util.List<java.lang.Class<? extends java.lang.Exception>> getApplicationCheckedExceptions()

getTransactionalMethodAttributes

protected java.util.Map<java.lang.reflect.Method,TransactionAttribute> getTransactionalMethodAttributes()

isTransactional

public boolean isTransactional()
Returns:
Returns the transactional.

setTransactional

public void setTransactional(boolean transactional)
Parameters:
transactional - The transactional to set.


Copyright 2006 Interface21. All Rights Reserved.