Top Inners Fields Constructors Methods
org.hibernate.engine.transaction.jta.platform.internal

public abstract Class AbstractJtaPlatform

extends Object
implements JtaPlatform, Configurable, ServiceRegistryAwareService, TransactionManagerAccess
Class Inheritance
All Implemented Interfaces
org.hibernate.engine.transaction.jta.platform.internal.TransactionManagerAccess, java.io.Serializable, org.hibernate.service.spi.ServiceRegistryAwareService, org.hibernate.service.spi.Configurable, org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform, org.hibernate.service.Service
Known Direct Subclasses
org.hibernate.engine.transaction.jta.platform.internal.AtomikosJtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.BitronixJtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.BorlandEnterpriseServerJtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.JBossStandAloneJtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.JOnASJtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.JOTMJtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.JRun4JtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.OC4JJtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.OrionJtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.ResinJtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.SapNetWeaverJtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.SunOneJtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.WeblogicJtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.WebSphereExtendedJtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.WebSphereJtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.WebSphereLibertyJtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.WildFlyStandAloneJtaPlatform
Imports
java.util.Map, jakarta.transaction.Synchronization, .SystemException, .Transaction, .TransactionManager, .UserTransaction, org.hibernate.cfg.AvailableSettings, org.hibernate.engine.jndi.spi.JndiService, org.hibernate.engine.transaction.internal.jta.JtaStatusHelper, org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform, .JtaPlatformException, org.hibernate.internal.util.NullnessUtil, org.hibernate.internal.util.config.ConfigurationHelper, org.hibernate.service.ServiceRegistry, org.hibernate.service.spi.Configurable, .ServiceRegistryAwareService, .ServiceRegistryImplementor

Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private ServiceRegistryImplementor
private final JtaSynchronizationStrategy
private TransactionManager
private UserTransaction

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected boolean
protected boolean
protected boolean
protected boolean
public boolean
public void
configure(Map<String, Object>
The configuration properties.
configValues
)

Implements org.hibernate.service.spi.Configurable.configure.

Configure the service.
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
protected JtaSynchronizationStrategy
public Object
getTransactionIdentifier(Transaction
The transaction to be identified.
transaction
)

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

Determine an identifier for the given transaction appropriate for use in caching/lookup usages.
public TransactionManager
public void
injectServices(ServiceRegistryImplementor
The registry
serviceRegistry
)

Implements org.hibernate.service.spi.ServiceRegistryAwareService.injectServices.

Callback to inject the registry.
protected JndiService
protected abstract TransactionManager
protected abstract UserTransaction
public void
registerSynchronization(Synchronization
The synchronization to register
synchronization
)

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

Register a JTA Synchronization in the means defined by the platform.
public TransactionManager
public UserTransaction
protected ServiceRegistry
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheTransactionManagerback to summary
private boolean cacheTransactionManager
cacheUserTransactionback to summary
private boolean cacheUserTransaction
serviceRegistryback to summary
private ServiceRegistryImplementor serviceRegistry
tmSynchronizationStrategyback to summary
private final JtaSynchronizationStrategy tmSynchronizationStrategy
transactionManagerback to summary
private TransactionManager transactionManager
userTransactionback to summary
private UserTransaction userTransaction

Constructor Detail

AbstractJtaPlatformback to summary
public AbstractJtaPlatform()

Method Detail

canCacheTransactionManagerback to summary
protected boolean canCacheTransactionManager()
canCacheTransactionManagerByDefaultback to summary
protected boolean canCacheTransactionManagerByDefault()
canCacheUserTransactionback to summary
protected boolean canCacheUserTransaction()
canCacheUserTransactionByDefaultback to summary
protected boolean canCacheUserTransactionByDefault()
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
configureback to summary
public void configure(Map<String, Object> configValues)

Implements org.hibernate.service.spi.Configurable.configure.

Doc from org.hibernate.service.spi.Configurable.configure.

Configure the service.

Parameters
configValues:Map<String, Object>

The configuration properties.

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
Exceptions
SystemException:
Indicates a problem access the underlying status
getSynchronizationStrategyback to summary
protected JtaSynchronizationStrategy getSynchronizationStrategy()
getTransactionIdentifierback to summary
public Object getTransactionIdentifier(Transaction transaction)

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

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

Determine an identifier for the given transaction appropriate for use in caching/lookup usages.

Generally speaking the transaction itself will be returned here. This method was added specifically for use in WebSphere and other unfriendly Java EE containers.

Parameters
transaction:Transaction

The transaction to be identified.

Returns:Object

An appropriate identifier

Annotations
@Override
getTransactionManagerback to summary
public TransactionManager getTransactionManager()

Implements org.hibernate.engine.transaction.jta.platform.internal.TransactionManagerAccess.getTransactionManager.

Doc from org.hibernate.engine.transaction.jta.platform.internal.TransactionManagerAccess.getTransactionManager.

Obtain the transaction manager

Returns:TransactionManager

The transaction manager.

Annotations
@Override
injectServicesback to summary
public void injectServices(ServiceRegistryImplementor serviceRegistry)

Implements org.hibernate.service.spi.ServiceRegistryAwareService.injectServices.

Doc from org.hibernate.service.spi.ServiceRegistryAwareService.injectServices.

Callback to inject the registry.

Parameters
serviceRegistry:ServiceRegistryImplementor

The registry

Annotations
@Override
jndiServiceback to summary
protected JndiService jndiService()
locateTransactionManagerback to summary
protected abstract TransactionManager locateTransactionManager()
locateUserTransactionback to summary
protected abstract UserTransaction locateUserTransaction()
registerSynchronizationback to summary
public void registerSynchronization(Synchronization synchronization)

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

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

Register a JTA Synchronization in the means defined by the platform.

Parameters
synchronization:Synchronization

The synchronization to register

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.

If org.hibernate.cfg.AvailableSettings#PREFER_USER_TRANSACTION is enabled, Hibernate will use the UserTransaction in preference to the TransactionManager where possible.

Returns:UserTransaction

The UserTransaction

Annotations
@Override
serviceRegistryback to summary
protected ServiceRegistry serviceRegistry()
org.hibernate.engine.transaction.jta.platform.internal back to summary

private final Class AbstractJtaPlatform.TransactionManagerBasedSynchronizationStrategy

extends Object
implements JtaSynchronizationStrategy
Class Inheritance
  • java.lang.Object
  • org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform.TransactionManagerBasedSynchronizationStrategy
All Implemented Interfaces
org.hibernate.engine.transaction.jta.platform.internal.JtaSynchronizationStrategy, java.io.Serializable

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

TransactionManagerBasedSynchronizationStrategyback to summary
private TransactionManagerBasedSynchronizationStrategy()

Method Detail

canRegisterSynchronizationback to summary
public boolean canRegisterSynchronization()

Implements org.hibernate.engine.transaction.jta.platform.internal.JtaSynchronizationStrategy.canRegisterSynchronization.

Doc from org.hibernate.engine.transaction.jta.platform.internal.JtaSynchronizationStrategy.canRegisterSynchronization.

Can a synchronization be registered?

Returns:boolean

true/false

Annotations
@Override
registerSynchronizationback to summary
public void registerSynchronization(Synchronization synchronization)

Implements org.hibernate.engine.transaction.jta.platform.internal.JtaSynchronizationStrategy.registerSynchronization.

Doc from org.hibernate.engine.transaction.jta.platform.internal.JtaSynchronizationStrategy.registerSynchronization.

Register a synchronization

Parameters
synchronization:Synchronization

The synchronization to register.

Annotations
@Override