Top Description Methods
org.hibernate.engine.transaction.jta.platform.spi

public Interface JtaPlatform

extends Service
Known Direct Implementers
org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform, org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform
Imports
javax.transaction.Synchronization, .SystemException, .Transaction, .TransactionManager, .UserTransaction, org.hibernate.service.Service

Defines how we interact with various JTA services on the given platform/environment.
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

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

Can we currently register a Synchronization?

public int

Returns:

The current status.
getCurrentStatus
()

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

public Object

Returns:

An appropriate identifier
getTransactionIdentifier
(Transaction
The transaction to be identified.
transaction
)

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

public void
registerSynchronization(Synchronization
The synchronization to register
synchronization
)

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

public TransactionManager
public UserTransaction

Method Detail

canRegisterSynchronizationback to summary
public boolean canRegisterSynchronization()

Can we currently register a Synchronization?

Returns:boolean

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

getCurrentStatusback to summary
public int getCurrentStatus() throws SystemException

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

Returns:int

The current status.

Exceptions
SystemException:
Indicates a problem access the underlying status
getTransactionIdentifierback to summary
public Object getTransactionIdentifier(Transaction transaction)

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

registerSynchronizationback to summary
public void registerSynchronization(Synchronization synchronization)

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

Parameters
synchronization:Synchronization

The synchronization to register

retrieveTransactionManagerback to summary
public TransactionManager retrieveTransactionManager()

Locate the TransactionManager

Returns:TransactionManager

The TransactionManager

retrieveUserTransactionback to summary
public UserTransaction retrieveUserTransaction()

Locate the UserTransaction

Returns:UserTransaction

The UserTransaction