org.seasar.junitcdi.jta.internal
クラス TransactionRollingbackInterceptor

java.lang.Object
  上位を拡張 org.seasar.junitcdi.jta.internal.TransactionRollingbackInterceptor

@Interceptor
@Transactional
public class TransactionRollingbackInterceptor
extends Object

インターセプタが適用されたメソッドをトランザクション制御下で呼び出してからロールバックするインターセプタです.

トランザクションが開始されていない状態で対象のメソッドが呼び出された場合は トランザクションを開始します. 対象のメソッドが終了するとトランザクションをロールバックします.

トランザクションが開始済みの状態で対象のメソッドが呼び出された場合は,何もせずに対象のメソッドを呼び出します.

作成者:
koichik

フィールドの概要
protected  UserTransaction userTransaction
          UserTransaction
 
コンストラクタの概要
TransactionRollingbackInterceptor()
           
 
メソッドの概要
 Object invoke(InvocationContext invocation)
          インターセプタが適用されたメソッドをトランザクション制御下で呼び出しロールバックします.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

userTransaction

@Inject
protected UserTransaction userTransaction
UserTransaction

コンストラクタの詳細

TransactionRollingbackInterceptor

public TransactionRollingbackInterceptor()
メソッドの詳細

invoke

public Object invoke(InvocationContext invocation)
              throws Exception
インターセプタが適用されたメソッドをトランザクション制御下で呼び出しロールバックします.

パラメータ:
invocation - 呼び出しコンテキスト
戻り値:
インターセプタが適用されたメソッドの戻り値
例外:
Exception - 例外が発生した場合


Copyright © 2010 The Seasar Foundation. All Rights Reserved.