Top Description Fields Constructors Methods
org.springframework.transaction.jta

public Class JtaAfterCompletionSynchronization

extends Object
implements Synchronization
Class Inheritance
All Implemented Interfaces
jakarta.transaction.Synchronization
Imports
java.util.List, jakarta.transaction.Status, .Synchronization, org.springframework.transaction.support.TransactionSynchronization, .TransactionSynchronizationUtils

Adapter for a JTA Synchronization, invoking the afterCommit / afterCompletion callbacks of Spring TransactionSynchronization objects callbacks after the outer JTA transaction has completed. Applied when participating in an existing (non-Spring) JTA transaction.
Author
Juergen Hoeller
Since
2.0
See Also
TransactionSynchronization#afterCommit, TransactionSynchronization#afterCompletion

Field Summary

Modifier and TypeField and Description
private final List<TransactionSynchronization>

Constructor Summary

AccessConstructor and Description
public
JtaAfterCompletionSynchronization(List<TransactionSynchronization>
the List of TransactionSynchronization objects
synchronizations
)

Create a new JtaAfterCompletionSynchronization for the given synchronization objects.

Method Summary

Modifier and TypeMethod and Description
public void
afterCompletion(int
The status of the transaction completion.
status
)

Implements jakarta.transaction.Synchronization.afterCompletion.

This method is called by the transaction manager after the transaction is committed or rolled back.
public void
beforeCompletion()

Implements jakarta.transaction.Synchronization.beforeCompletion.

The beforeCompletion method is called by the transaction manager prior to the start of the two-phase transaction commit process.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

synchronizationsback to summary
private final List<TransactionSynchronization> synchronizations

Constructor Detail

JtaAfterCompletionSynchronizationback to summary
public JtaAfterCompletionSynchronization(List<TransactionSynchronization> synchronizations)

Create a new JtaAfterCompletionSynchronization for the given synchronization objects.

Parameters
synchronizations:List<TransactionSynchronization>

the List of TransactionSynchronization objects

See Also
org.springframework.transaction.support.TransactionSynchronization

Method Detail

afterCompletionback to summary
public void afterCompletion(int status)

Implements jakarta.transaction.Synchronization.afterCompletion.

Doc from jakarta.transaction.Synchronization.afterCompletion.

This method is called by the transaction manager after the transaction is committed or rolled back.

Parameters
status:int

The status of the transaction completion.

Annotations
@Override
beforeCompletionback to summary
public void beforeCompletion()

Implements jakarta.transaction.Synchronization.beforeCompletion.

Doc from jakarta.transaction.Synchronization.beforeCompletion.

The beforeCompletion method is called by the transaction manager prior to the start of the two-phase transaction commit process. This call is executed with the transaction context of the transaction that is being committed.

Annotations
@Override