public class AnnotationTransactionAttributeSource extends AbstractFallbackTransactionAttributeSource implements SerializableSE
TransactionAttributeSource
インターフェースの実装。 このクラスは、Spring の JDK 1.5 + Transactional
アノテーションを読み取り、対応するトランザクション属性を Spring のトランザクションインフラストラクチャに公開します。JTA 1.2 の Transactional
SE および EJB3 の TransactionAttribute
EE アノテーション(存在する場合)もサポートします。このクラスは、カスタム TransactionAttributeSource の基本クラスとして機能することも、TransactionAnnotationParser
戦略を通じてカスタマイズされることもあります。
Transactional
, TransactionAnnotationParser
, SpringTransactionAnnotationParser
, Ejb3TransactionAnnotationParser
, TransactionAspectSupport.setTransactionAttributeSource(org.springframework.transaction.interceptor.TransactionAttributeSource)
, TransactionProxyFactoryBean.setTransactionAttributeSource(org.springframework.transaction.interceptor.TransactionAttributeSource)
, 直列化された形式 logger
コンストラクターと説明 |
---|
AnnotationTransactionAttributeSource() デフォルトの AnnotationTransactionAttributeSource を作成し、 Transactional アノテーションまたは EJB3 TransactionAttribute EE アノテーションを運ぶ public メソッドをサポートします。 |
AnnotationTransactionAttributeSource(boolean publicMethodsOnly) Transactional アノテーションまたは EJB3 TransactionAttribute EE アノテーションを運ぶ public メソッドをサポートするカスタム AnnotationTransactionAttributeSource を作成します。 |
AnnotationTransactionAttributeSource(SetSE<TransactionAnnotationParser> annotationParsers) カスタム AnnotationTransactionAttributeSource を作成します。 |
AnnotationTransactionAttributeSource(TransactionAnnotationParser... annotationParsers) カスタム AnnotationTransactionAttributeSource を作成します。 |
AnnotationTransactionAttributeSource(TransactionAnnotationParser annotationParser) カスタム AnnotationTransactionAttributeSource を作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
protected boolean | allowPublicMethodsOnly() デフォルトでは、public メソッドのみをトランザクション対応にすることができます。 |
protected TransactionAttribute | determineTransactionAttribute(AnnotatedElementSE element) 指定されたメソッドまたはクラスのトランザクション属性を決定します。 |
boolean | equals(ObjectSE other) |
protected TransactionAttribute | findTransactionAttribute(ClassSE<?> clazz) サブクラスは、特定のクラスのトランザクション属性があれば、それを返すためにこれを実装する必要があります。 |
protected TransactionAttribute | findTransactionAttribute(MethodSE method) サブクラスは、指定されたメソッドのトランザクション属性があればそれを返すためにこれを実装する必要があります。 |
int | hashCode() |
computeTransactionAttribute, getCacheKey, getTransactionAttribute
cloneSE, finalizeSE, getClassSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public AnnotationTransactionAttributeSource()
Transactional
アノテーションまたは EJB3 TransactionAttribute
EE アノテーションを運ぶ public メソッドをサポートします。public AnnotationTransactionAttributeSource(boolean publicMethodsOnly)
Transactional
アノテーションまたは EJB3 TransactionAttribute
EE アノテーションを運ぶ public メソッドをサポートするカスタム AnnotationTransactionAttributeSource を作成します。publicMethodsOnly
- Transactional
アノテーションのみを保持する public メソッド(通常はプロキシベースの AOP で使用)、または保護 / プライベートメソッドもサポートするかどうか (通常、AspectJ クラスのウィービングで使用されます)public AnnotationTransactionAttributeSource(TransactionAnnotationParser annotationParser)
annotationParser
- 使用する TransactionAnnotationParserpublic AnnotationTransactionAttributeSource(TransactionAnnotationParser... annotationParsers)
annotationParsers
- 使用する TransactionAnnotationParserspublic AnnotationTransactionAttributeSource(SetSE<TransactionAnnotationParser> annotationParsers)
annotationParsers
- 使用する TransactionAnnotationParsers@Nullable protected TransactionAttribute findTransactionAttribute(ClassSE<?> clazz)
AbstractFallbackTransactionAttributeSource
AbstractFallbackTransactionAttributeSource
の findTransactionAttribute
clazz
- 属性を取得するクラス null
@Nullable protected TransactionAttribute findTransactionAttribute(MethodSE method)
AbstractFallbackTransactionAttributeSource
AbstractFallbackTransactionAttributeSource
の findTransactionAttribute
method
- 属性を取得するメソッド null
@Nullable protected TransactionAttribute determineTransactionAttribute(AnnotatedElementSE element)
この実装は、既知のアノテーションを Spring のメタデータ属性クラスに解析するために、構成済みの TransactionAnnotationParsers
に委譲します。トランザクションでない場合、null
を返します。
トランザクションメタデータを運ぶカスタムアノテーションをサポートするためにオーバーライドできます。
element
- アノテーション付きのメソッドまたはクラス null
protected boolean allowPublicMethodsOnly()
AbstractFallbackTransactionAttributeSource
の allowPublicMethodsOnly
public int hashCode()
ObjectSE
の hashCodeSE