public class UserTransactionAdapter extends ObjectSE implements UserTransactionSE
TransactionManagerSE 参照を取得し、JTA UserTransactionSE ハンドルを作成します。JTA UserTransaction インターフェースは、JTA TransactionManager インターフェースの正確なサブセットです。残念ながら、これは TransactionManager のスーパーインターフェースとしては機能しません。ただし、UserTransaction インターフェースを介して TransactionManager ハンドルと通信する場合は、このクラスなどのアダプターを使用する必要があります。
特定のシナリオで Spring の JtaTransactionManager によって内部的に使用されます。アプリケーションコードで直接使用するためのものではありません。
| コンストラクターと説明 |
|---|
UserTransactionAdapter(TransactionManagerSE transactionManager) 指定された TransactionManager の新しい UserTransactionAdapter を作成します。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | begin() |
void | commit() |
int | getStatus() |
TransactionManagerSE | getTransactionManager() このアダプターが委譲する JTA TransactionManager を返します。 |
void | rollback() |
void | setRollbackOnly() |
void | setTransactionTimeout(int timeout) |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic UserTransactionAdapter(TransactionManagerSE transactionManager)
transactionManager - ラップする JTA TransactionManagerpublic final TransactionManagerSE getTransactionManager()
public void setTransactionTimeout(int timeout)
throws SystemExceptionSEUserTransactionSE の setTransactionTimeoutSE SystemExceptionSEpublic void begin()
throws NotSupportedExceptionSE,
SystemExceptionSEUserTransactionSE の beginSE NotSupportedExceptionSESystemExceptionSEpublic void commit()
throws RollbackExceptionSE,
HeuristicMixedExceptionSE,
HeuristicRollbackExceptionSE,
SecurityExceptionSE,
SystemExceptionSEpublic void rollback()
throws SecurityExceptionSE,
SystemExceptionSEUserTransactionSE の rollbackSE SecurityExceptionSESystemExceptionSEpublic void setRollbackOnly()
throws SystemExceptionSEUserTransactionSE の setRollbackOnlySE SystemExceptionSEpublic int getStatus()
throws SystemExceptionSEUserTransactionSE の getStatusSE SystemExceptionSE