Interface JtaPlatform
-
- All Superinterfaces:
Serializable,Service
public interface JtaPlatform extends Service
Defines how we interact with various JTA services on the given platform/environment.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanRegisterSynchronization()Can we currently register aSynchronization?intgetCurrentStatus()Obtain the current transaction status using whatever means is preferred for this platformObjectgetTransactionIdentifier(Transaction transaction)Determine an identifier for the given transaction appropriate for use in caching/lookup usages.voidregisterSynchronization(Synchronization synchronization)Register a JTASynchronizationin the means defined by the platform.TransactionManagerretrieveTransactionManager()Locate theTransactionManagerUserTransactionretrieveUserTransaction()Locate theUserTransaction
-
-
-
Method Detail
-
retrieveTransactionManager
TransactionManager retrieveTransactionManager()
Locate theTransactionManager- Returns:
- The
TransactionManager
-
retrieveUserTransaction
UserTransaction retrieveUserTransaction()
Locate theUserTransaction- Returns:
- The
UserTransaction
-
getTransactionIdentifier
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- The transaction to be identified.- Returns:
- An appropriate identifier
-
canRegisterSynchronization
boolean canRegisterSynchronization()
Can we currently register aSynchronization?- Returns:
- True if registering a
Synchronizationis currently allowed; false otherwise.
-
registerSynchronization
void registerSynchronization(Synchronization synchronization)
Register a JTASynchronizationin the means defined by the platform.- Parameters:
synchronization- The synchronization to register
-
getCurrentStatus
int getCurrentStatus() throws SystemExceptionObtain the current transaction status using whatever means is preferred for this platform- Returns:
- The current status.
- Throws:
SystemException- Indicates a problem access the underlying status
-
-