public class UserTransactionAdapter extends ObjectSE implements UserTransactionSE
TransactionManager
SE 参照を取得し、JTA UserTransaction
SE ハンドルを作成します。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, waitSE
public UserTransactionAdapter(TransactionManagerSE transactionManager)
transactionManager
- ラップする JTA TransactionManagerpublic final TransactionManagerSE getTransactionManager()
public void setTransactionTimeout(int timeout) throws SystemExceptionSE
UserTransactionSE
の setTransactionTimeoutSE
SystemExceptionSE
public void begin() throws NotSupportedExceptionSE, SystemExceptionSE
UserTransactionSE
の beginSE
NotSupportedExceptionSE
SystemExceptionSE
public void commit() throws RollbackExceptionSE, HeuristicMixedExceptionSE, HeuristicRollbackExceptionSE, SecurityExceptionSE, SystemExceptionSE
public void rollback() throws SecurityExceptionSE, SystemExceptionSE
UserTransactionSE
の rollbackSE
SecurityExceptionSE
SystemExceptionSE
public void setRollbackOnly() throws SystemExceptionSE
UserTransactionSE
の setRollbackOnlySE
SystemExceptionSE
public int getStatus() throws SystemExceptionSE
UserTransactionSE
の getStatusSE
SystemExceptionSE