此内容没有您所选择的语言版本。
2.6. Transaction Synchronization
Transaction synchronization allows the application server to be notified before and after the transaction completes. For each transaction started, the application server may optionally register a
Synchronization callback object to be invoked by the transaction manager either before or after completion:
- The
beforeCompletionmethod is called prior to the start of the two-phase transaction complete process. This call is executed in the same transaction context of the caller who initiates theTransactionManager.commit, or with no transaction context ifTransaction.commitis used. - The
afterCompletionmethod is called after the transaction has completed. The status of the transaction is supplied in the parameter. This method is executed without a transaction context.