public class WebLogicJtaTransactionManager extends JtaTransactionManager
JtaTransactionManager バリアント(9.0 以降)。WebLogic のトランザクションコーディネーターで、 標準の JTA を超える Spring のトランザクション定義のすべての機能をサポートします: トランザクション名、トランザクションごとの分離レベル、すべての場合のトランザクションの適切な再開。WebLogic の特別な begin(name) メソッドを使用して JTA トランザクションを開始し、WebLogic のトランザクションモニターで Spring 駆動型トランザクションを表示します。Spring の宣言的トランザクションの場合、公開される名前は(デフォルトで)完全修飾クラス名 + "。" になります。+ メソッド名。
WebLogic の対応する JTA トランザクションプロパティ "ISOLATION LEVEL" により、 トランザクションごとの分離レベルをサポートします。これにより、指定された分離レベル(ISOLATION_SERIALIZABLE など)が、特定のトランザクションに参加するすべての JDBC 接続に適用されます。
標準の JTA 再開が失敗した場合は WebLogic の特別な forceResume メソッドを呼び出し、 ターゲットトランザクションが rollback-only とマークされている場合も再開します。そもそもこのトランザクション停止の機能に依存していない場合、Spring の標準 JtaTransactionManager も適切に動作します。
デフォルトでは、JTA UserTransaction および TransactionManager ハンドルは WebLogic の TransactionHelper から直接フェッチされます。これは、"userTransaction"/"userTransactionName" " と "transactionManager"/"transactionManagerName" " を指定するか、既存のハンドルを渡すか、検索する対応する JNDI の場所を指定することでオーバーライドできます。
NOTE: この JtaTransactionManager は、Spring 側の特定のトランザクション区分動作を改善することを目的としています。永続性プロバイダーで個別に構成された WebLogic トランザクション戦略と共存でき、それらのセットアップを何らかの方法で具体的に接続する必要はありません。
TransactionDefinition.getName(), TransactionDefinition.getIsolationLevel(), UserTransactionSE, TransactionSE, TransactionManagerSE, TransactionHelperSE, 連載形式 AbstractPlatformTransactionManager.SuspendedResourcesHolderDEFAULT_TRANSACTION_SYNCHRONIZATION_REGISTRY_NAME, DEFAULT_USER_TRANSACTION_NAME, FALLBACK_TRANSACTION_MANAGER_NAMESlogger, SYNCHRONIZATION_ALWAYS, SYNCHRONIZATION_NEVER, SYNCHRONIZATION_ON_ACTUAL_TRANSACTION| コンストラクターと説明 |
|---|
WebLogicJtaTransactionManager() |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | afterPropertiesSet()UserTransaction および TransactionManager ハンドルを初期化します。 |
TransactionSE | createTransaction(StringSE name, int timeout) 指定された名前とタイムアウトに基づいてアクティブな Transaction オブジェクトを作成します。 |
protected void | doJtaBegin(JtaTransactionObject txObject, TransactionDefinition definition)JTA UserTransaction または TransactionManager で JTA 開始を実行します。 |
protected void | doJtaResume(JtaTransactionObject txObject, ObjectSE suspendedTransaction)JTA TransactionManager で JTA 履歴書を実行します。 |
protected TransactionManagerSE | retrieveTransactionManager() サブクラスがベンダー固有の方法で JTA TransactionManager を取得できるようにします。 |
protected UserTransactionSE | retrieveUserTransaction() サブクラスがベンダー固有の方法で JTA UserTransaction を取得できるようにします。 |
applyIsolationLevel, applyTimeout, buildUserTransaction, checkUserTransactionAndTransactionManager, doBegin, doCleanupAfterCompletion, doCommit, doGetJtaTransaction, doGetTransaction, doJtaSuspend, doRegisterAfterCompletionWithJtaTransaction, doResume, doRollback, doSetRollbackOnly, doSuspend, findTransactionManager, findTransactionSynchronizationRegistry, findUserTransaction, getJndiEnvironment, getJndiTemplate, getTransactionManager, getTransactionSynchronizationRegistry, getUserTransaction, initTransactionSynchronizationRegistry, initUserTransactionAndTransactionManager, isExistingTransaction, lookupTransactionManager, lookupTransactionSynchronizationRegistry, lookupUserTransaction, registerAfterCompletionWithExistingTransaction, retrieveTransactionSynchronizationRegistry, setAllowCustomIsolationLevels, setAutodetectTransactionManager, setAutodetectTransactionSynchronizationRegistry, setAutodetectUserTransaction, setCacheUserTransaction, setJndiEnvironment, setJndiTemplate, setTransactionManager, setTransactionManagerName, setTransactionSynchronizationRegistry, setTransactionSynchronizationRegistryName, setUserTransaction, setUserTransactionName, shouldCommitOnGlobalRollbackOnly, supportsResourceAdapterManagedTransactions, useSavepointForNestedTransactioncommit, determineTimeout, getDefaultTimeout, getTransaction, getTransactionSynchronization, invokeAfterCompletion, isFailEarlyOnGlobalRollbackOnly, isGlobalRollbackOnParticipationFailure, isNestedTransactionAllowed, isRollbackOnCommitFailure, isValidateExistingTransaction, newTransactionStatus, prepareForCommit, prepareSynchronization, prepareTransactionStatus, resume, rollback, setDefaultTimeout, setFailEarlyOnGlobalRollbackOnly, setGlobalRollbackOnParticipationFailure, setNestedTransactionAllowed, setRollbackOnCommitFailure, setTransactionSynchronization, setTransactionSynchronizationName, setValidateExistingTransaction, suspend, triggerBeforeCommit, triggerBeforeCompletioncloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic void afterPropertiesSet()
throws TransactionSystemExceptionJtaTransactionManagerInitializingBean の afterPropertiesSet JtaTransactionManager の afterPropertiesSet TransactionSystemExceptionJtaTransactionManager.initUserTransactionAndTransactionManager()@Nullable protected UserTransactionSE retrieveUserTransaction() throws TransactionSystemException
JtaTransactionManager デフォルトの実装は、単に null を返します。
JtaTransactionManager の retrieveUserTransaction null TransactionSystemException - エラーの場合 JtaTransactionManager.setUserTransaction(javax.transaction.UserTransaction), JtaTransactionManager.setUserTransactionName(java.lang.String)@Nullable protected TransactionManagerSE retrieveTransactionManager() throws TransactionSystemException
JtaTransactionManager デフォルトの実装は、単に null を返します。
JtaTransactionManager の retrieveTransactionManager null TransactionSystemException - エラーの場合 JtaTransactionManager.setTransactionManager(javax.transaction.TransactionManager), JtaTransactionManager.setTransactionManagerName(java.lang.String)protected void doJtaBegin(JtaTransactionObject txObject, TransactionDefinition definition) throws NotSupportedExceptionSE, SystemExceptionSE
JtaTransactionManagerこの実装では、標準の JTA 機能のみがサポートされます。つまり、トランザクションごとの分離レベルとトランザクション名はサポートされません。特定の JTA 実装のために、サブクラスでオーバーライドできます。
UserTransaction の begin メソッドを呼び出す前に、applyIsolationLevel および applyTimeout を呼び出します。
JtaTransactionManager の doJtaBegin txObject - UserTransaction を含む JtaTransactionObjectdefinition - TransactionDefinition インスタンス。伝播動作、分離レベル、読み取り専用フラグ、タイムアウト、トランザクション名を記述します NotSupportedExceptionSE - JTA メソッドによってスローされた場合 SystemExceptionSE - JTA メソッドによってスローされた場合 JtaTransactionManager.getUserTransaction(), JtaTransactionManager.getTransactionManager(), JtaTransactionManager.applyIsolationLevel(org.springframework.transaction.jta.JtaTransactionObject, int), JtaTransactionManager.applyTimeout(org.springframework.transaction.jta.JtaTransactionObject, int), JtaTransactionObject.getUserTransaction(), UserTransaction.setTransactionTimeout(int)SE, UserTransaction.begin()SEprotected void doJtaResume(@Nullable JtaTransactionObject txObject, ObjectSE suspendedTransaction) throws InvalidTransactionExceptionSE, SystemExceptionSE
JtaTransactionManager特定の JTA 実装のために、サブクラスでオーバーライドできます。
JtaTransactionManager の doJtaResume txObject - UserTransaction を含む JtaTransactionObjectsuspendedTransaction - 中断された JTA トランザクションオブジェクト InvalidTransactionExceptionSE - JTA メソッドによってスローされた場合 SystemExceptionSE - JTA メソッドによってスローされた場合 JtaTransactionManager.getTransactionManager(), TransactionManager.resume(javax.transaction.Transaction)SEpublic TransactionSE createTransaction(@Nullable StringSE name, int timeout) throws NotSupportedExceptionSE, SystemExceptionSE
TransactionFactoryTransactionFactory の createTransaction JtaTransactionManager の createTransaction name - トランザクション名 (null の場合があります)timeout - トランザクションのタイムアウト (デフォルトのタイムアウトの場合は -1)null)NotSupportedExceptionSE - トランザクションマネージャーが指定された型のトランザクションをサポートしていない場合 SystemExceptionSE - トランザクションマネージャーがトランザクションの作成に失敗した場合