Top Description Fields Constructors Methods
org.springframework.orm.hibernate5

pack-priv Class ConfigurableJtaPlatform

extends Object
implements JtaPlatform
Class Inheritance
All Implemented Interfaces
org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform, org.hibernate.service.Service, java.io.Serializable
Annotations
@SuppressWarnings:serial
Imports
jakarta.transaction.Status, .Synchronization, .SystemException, .Transaction, .TransactionManager, .TransactionSynchronizationRegistry, .UserTransaction, org.hibernate.TransactionException, org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform, org.springframework.lang.Nullable, org.springframework.transaction.jta.UserTransactionAdapter, org.springframework.util.Assert

Implementation of Hibernate 5's JtaPlatform SPI, exposing passed-in TransactionManager, UserTransaction and TransactionSynchronizationRegistry references.
Author
Juergen Hoeller
Since
4.2

Field Summary

Modifier and TypeField and Description
private final TransactionManager
private final TransactionSynchronizationRegistry
private final UserTransaction

Constructor Summary

AccessConstructor and Description
public
ConfigurableJtaPlatform(TransactionManager
the JTA TransactionManager reference (required)
tm
,
UserTransaction
the JTA UserTransaction reference (optional)
ut
,
TransactionSynchronizationRegistry
the JTA 1.1 TransactionSynchronizationRegistry (optional)
tsr
)

Create a new ConfigurableJtaPlatform instance with the given JTA TransactionManager and optionally a given UserTransaction.

Method Summary

Modifier and TypeMethod and Description
public boolean
public int
getCurrentStatus()

Implements org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform.getCurrentStatus.

Obtain the current transaction status using whatever means is preferred for this platform

public Object
public void
public TransactionManager
public UserTransaction
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

transactionManagerback to summary
private final TransactionManager transactionManager
transactionSynchronizationRegistryback to summary
private final TransactionSynchronizationRegistry transactionSynchronizationRegistry
Annotations
@Nullable
userTransactionback to summary
private final UserTransaction userTransaction

Constructor Detail

ConfigurableJtaPlatformback to summary
public ConfigurableJtaPlatform(TransactionManager tm, UserTransaction ut, TransactionSynchronizationRegistry tsr)

Create a new ConfigurableJtaPlatform instance with the given JTA TransactionManager and optionally a given UserTransaction.

Parameters
tm:TransactionManager

the JTA TransactionManager reference (required)

ut:UserTransaction

the JTA UserTransaction reference (optional)

tsr:TransactionSynchronizationRegistry

the JTA 1.1 TransactionSynchronizationRegistry (optional)

Method Detail

canRegisterSynchronizationback to summary
public boolean canRegisterSynchronization()

Implements org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform.canRegisterSynchronization.

Doc from org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform.canRegisterSynchronization.

Can we currently register a Synchronization?

Returns:boolean

True if registering a Synchronization is currently allowed; false otherwise.

Annotations
@Override
getCurrentStatusback to summary
public int getCurrentStatus() throws SystemException

Implements org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform.getCurrentStatus.

Doc from org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform.getCurrentStatus.

Obtain the current transaction status using whatever means is preferred for this platform

Returns:int

The current status.

Annotations
@Override
getTransactionIdentifierback to summary
public Object getTransactionIdentifier(Transaction transaction)
Annotations
@Override
registerSynchronizationback to summary
public void registerSynchronization(Synchronization synchronization)
Annotations
@Override
retrieveTransactionManagerback to summary
public TransactionManager retrieveTransactionManager()

Implements org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform.retrieveTransactionManager.

Doc from org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform.retrieveTransactionManager.

Locate the TransactionManager

Returns:TransactionManager

The TransactionManager

Annotations
@Override
retrieveUserTransactionback to summary
public UserTransaction retrieveUserTransaction()

Implements org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform.retrieveUserTransaction.

Doc from org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform.retrieveUserTransaction.

Locate the UserTransaction

Returns:UserTransaction

The UserTransaction

Annotations
@Override