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, String name, Class<?> componentClass)
           
 
Method Summary
 void addApplicationCheckedException(Class<? extends Exception> exception)
          Add application exception metadata.
protected  void addComponentContractInterceptors(ProxyFactory pf, Object bean, Map<Class,Object> interceptorInstancesForClass)
          Add interceptors that apply the component contract--such as EJB transaction behaviour.
 void addTransactionalMethod(Method methodOnClass, javax.ejb.TransactionAttribute txAttribute)
          Add transactional method metadata.
protected  DefaultTransactionAttribute copyEjbTxAttribute(javax.ejb.TransactionAttribute ejbTxAttribute, DefaultTransactionAttribute springTxAttribute)
          Sets the given Spring transaction definition according to the passed in ejb3 attribute.
protected  List<Class<? extends Exception>> getApplicationCheckedExceptions()
           
protected  Map<Method,javax.ejb.TransactionAttribute> getTransactionalMethodAttributes()
           
 boolean isTransactional()
           
 void setTransactional(boolean transactional)
           
 
Methods inherited from class org.springframework.jee.intercept.InterceptionMetadata
addAspectJAdvisors, addBeanControlInterfaceMethod, addBusinessInterface, addJeeInterceptors, addJeeInterceptors, addSelfInterceptor, addSpringAopAdvisors, addSuperInterceptors, createProxyIfNecessary, createProxyIfNecessary, customizeProxyConfig, findBusinessInterfacesFromClassOrAnnotation, getBeanControlInterface, getBeanControlInterfaceMethods, getBusinessInterfaces, getExclusion, getInterceptorMetadata, getInterceptorOrder, invokeLifecycleMethods, invokePostConstructAndRegisterShutdownHook, isExcludedAsBusinessInterfaceOnAutodetect, registerInterceptorMetadata, registerInterceptorOrder, registerSelfInterceptorMethod, setBeanControlInterface, setBeanControlInterfaceMethods, setComponentContext, setExcludeClassInterceptors, setExcludeDefaultInterceptors
 
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,
                             String name,
                             Class<?> componentClass)
Parameters:
name -
componentClass -
Method Detail

addComponentContractInterceptors

protected void addComponentContractInterceptors(ProxyFactory pf,
                                                Object bean,
                                                Map<Class,Object> interceptorInstancesForClass)
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 DefaultTransactionAttribute copyEjbTxAttribute(javax.ejb.TransactionAttribute ejbTxAttribute,
                                                         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(Method methodOnClass,
                                   javax.ejb.TransactionAttribute txAttribute)
Add transactional method metadata.

Parameters:
methodOnClass -
txAttribute -

addApplicationCheckedException

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

Parameters:
exception -

getApplicationCheckedExceptions

protected List<Class<? extends Exception>> getApplicationCheckedExceptions()

getTransactionalMethodAttributes

protected Map<Method,javax.ejb.TransactionAttribute> getTransactionalMethodAttributes()

isTransactional

public boolean isTransactional()
Returns:
Returns the transactional.

setTransactional

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


Copyright © 2007 Interface21. All Rights Reserved.