ch.elca.el4j.core.transaction
Class AnnotationTransactionMetaDataSource

java.lang.Object
  extended by ch.elca.el4j.util.metadata.DefaultGenericMetaDataSource
      extended by ch.elca.el4j.core.transaction.TransactionMetaDataSource
          extended by ch.elca.el4j.core.transaction.AnnotationTransactionMetaDataSource
All Implemented Interfaces:
GenericMetaDataSource, InitializingBean, TransactionAttributeSource

public class AnnotationTransactionMetaDataSource
extends TransactionMetaDataSource

Meta data source for transactional metadata of type Java 5 Annotation.

Author:
Martin Zeltner (MZE)

Field Summary
 
Fields inherited from class ch.elca.el4j.util.metadata.DefaultGenericMetaDataSource
m_cache, NULL_METADATA
 
Constructor Summary
AnnotationTransactionMetaDataSource()
           
 
Method Summary
protected  void addMetaDataRollbackConstraint(RuleBasedTransactionAttribute rbta, RollbackConstraint rollbackConstraint)
          Adds the given rollback constraint to the given rule based rollback attribute.
protected  void addMetaDataTransactional(RuleBasedTransactionAttribute rbta, Transactional ruleBasedTx)
          Adds the given transactional metadata to the given rule based rollback attribute.
protected  Collection filterMetaData(Collection metaData)
          Adds rollback constraints defined in RollbackConstraint to the existing transaction attribute.
 
Methods inherited from class ch.elca.el4j.core.transaction.TransactionMetaDataSource
afterPropertiesSet, finalizeRollbackBehavior, getTransactionAttribute
 
Methods inherited from class ch.elca.el4j.util.metadata.DefaultGenericMetaDataSource
computeMetaData, findAllAttributes, findAllAttributes, getCacheKey, getInterceptingMetaData, getMetaData, getMetaDataDelegator, setInterceptingMetaData, setMetaDataDelegator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationTransactionMetaDataSource

public AnnotationTransactionMetaDataSource()
Method Detail

filterMetaData

protected Collection filterMetaData(Collection metaData)
Adds rollback constraints defined in RollbackConstraint to the existing transaction attribute. Uses only the first found transaction and rollback constraint annotation.

Overrides:
filterMetaData in class DefaultGenericMetaDataSource
Parameters:
metaData - Are the metadata to filter.
Returns:
Returns the filtered collection of metadata or null if the returned collection would be empty. Only intercepting metadata will endure the filter process.

addMetaDataTransactional

protected void addMetaDataTransactional(RuleBasedTransactionAttribute rbta,
                                        Transactional ruleBasedTx)
Adds the given transactional metadata to the given rule based rollback attribute.

Parameters:
rbta - Is the rule based rollback attribute to complete
ruleBasedTx - Is the transactional metadata to add.

addMetaDataRollbackConstraint

protected void addMetaDataRollbackConstraint(RuleBasedTransactionAttribute rbta,
                                             RollbackConstraint rollbackConstraint)
Adds the given rollback constraint to the given rule based rollback attribute.

Parameters:
rbta - Is the rule based rollback attribute to complete
rollbackConstraint - Is the rollback constraint to add.


Copyright © 2005-2008 ELCA. All Rights Reserved.