Transaction Processing Limitations for Imported Transactions

12-6 Programming JTA for Oracle WebLogic Server and how transactions are processed with the WebLogic Server interposed transaction manager.

12.4 Transaction Processing for Imported Transactions

To import a foreign transaction into WebLogic Server, the foreign transaction manager or gateway can do the following: xar.startforeignXid, TMNOFLAGS; This operation associates the current thread with the imported transaction. All subsequent calls made to other servers propagate the imported WebLogic Server transaction, until the transaction is disassociated from the thread. To disassociate the imported transaction from the current thread, the foreign transaction manager or gateway should do the following: xar.endforeignXid, TMSUCCESS; Note that the WebLogic Server transaction manager ignores the flag.

12.4.1 Transaction Processing Limitations for Imported Transactions

Note the following processing limitations and behavior for imported transactions: ■ After a WebLogic Server transaction is started, the gateway cannot call start again on the same thread. With a client-side gateway, you can only call xar.start on one client interposed transaction manager at a time. Attempting to call xar.start on another client interposed transaction manager before xar.end was called on the first one throws an XAException with XAER_RMERR. With a server-side gateway, attempting to call xar.start on a client or server interposed transaction manager also throws a XAException with XAER_RMERR if there is an active transaction associated with the current thread. ■ The WebLogic Server interposed transaction managers XAResource exhibits loosely-coupled transaction branching behavior on different WebLogic Server servers. That is, if the same foreign Xid is imported on different WebLogic Server servers, they are imported to different WebLogic Server transactions. ■ The WebLogic Server transaction manager does not flatten the transaction tree, for example, the imported transaction of a previously exported WebLogic Server transaction are in a separate branch from the original WebLogic Server transaction. ■ A foreign transaction manager should ensure that all foreign Xids that are imported into WebLogic Server are unique and are not reused within the sum of the transaction abandon timeout period and the transaction timeout period. Failure to do so may result in log records that are never released in the WebLogic Server transaction manager. This could lead to inefficient crash recovery. Note: The flag is ignored by the WebLogic Server transaction manager. If the foreign Xid has been imported previously on the same WebLogic Server server, WebLogic Server associates the current thread with the previously imported WebLogic Server transaction. Participating in Transactions Managed by a Third-Party Transaction Manager 12-7

12.5 Commit Processing for Imported Transactions