public class AnnotationTransactionAttributeSource extends AbstractFallbackTransactionAttributeSource implements SerializableSE
TransactionAttributeSource インターフェースの実装。 このクラスは、Spring の JDK 1.5 + Transactional アノテーションを読み取り、対応するトランザクション属性を Spring のトランザクションインフラストラクチャに公開します。JTA 1.2 の TransactionalSE および EJB3 の TransactionAttributeEE アノテーション(存在する場合)もサポートします。このクラスは、カスタム 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 TransactionAttributeEE アノテーションを運ぶ public メソッドをサポートします。 |
AnnotationTransactionAttributeSource(boolean publicMethodsOnly)Transactional アノテーションまたは EJB3 TransactionAttributeEE アノテーションを運ぶ public メソッドをサポートするカスタム AnnotationTransactionAttributeSource を作成します。 |
AnnotationTransactionAttributeSource(SetSE<TransactionAnnotationParser> annotationParsers) カスタム AnnotationTransactionAttributeSource を作成します。 |
AnnotationTransactionAttributeSource(TransactionAnnotationParser... annotationParsers) カスタム AnnotationTransactionAttributeSource を作成します。 |
AnnotationTransactionAttributeSource(TransactionAnnotationParser annotationParser) カスタム AnnotationTransactionAttributeSource を作成します。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
protected boolean | allowPublicMethodsOnly() デフォルトでは、public メソッドのみをトランザクション対応にすることができます。 |
protected TransactionAttribute | determineTransactionAttribute(AnnotatedElementSE ae) 指定されたメソッドまたはクラスのトランザクション属性を決定します。 |
boolean | equals(ObjectSE other) |
protected TransactionAttribute | findTransactionAttribute(ClassSE<?> clazz) サブクラスは、特定のクラスのトランザクション属性があれば、それを返すためにこれを実装する必要があります。 |
protected TransactionAttribute | findTransactionAttribute(MethodSE method) サブクラスは、指定されたメソッドのトランザクション属性があればそれを返すためにこれを実装する必要があります。 |
int | hashCode() |
computeTransactionAttribute, getCacheKey, getTransactionAttributecloneSE, finalizeSE, getClassSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic AnnotationTransactionAttributeSource()
Transactional アノテーションまたは EJB3 TransactionAttributeEE アノテーションを運ぶ public メソッドをサポートします。public AnnotationTransactionAttributeSource(boolean publicMethodsOnly)
Transactional アノテーションまたは EJB3 TransactionAttributeEE アノテーションを運ぶ 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(MethodSE method)
AbstractFallbackTransactionAttributeSourceAbstractFallbackTransactionAttributeSource の findTransactionAttribute method - 属性を取得するメソッド null )@Nullable protected TransactionAttribute findTransactionAttribute(ClassSE<?> clazz)
AbstractFallbackTransactionAttributeSourceAbstractFallbackTransactionAttributeSource の findTransactionAttribute clazz - 属性を取得するクラス null )@Nullable protected TransactionAttribute determineTransactionAttribute(AnnotatedElementSE ae)
この実装は、既知のアノテーションを Spring のメタデータ属性クラスに解析するために、構成済みの TransactionAnnotationParsers に委譲します。トランザクションでない場合、null を返します。
トランザクションメタデータを運ぶカスタムアノテーションをサポートするためにオーバーライドできます。
ae - アノテーション付きのメソッドまたはクラス null protected boolean allowPublicMethodsOnly()
AbstractFallbackTransactionAttributeSource の allowPublicMethodsOnly public int hashCode()
ObjectSE の hashCodeSE