Class NoJtaPlatform
java.lang.Object
org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform
- All Implemented Interfaces:
Serializable
,JtaPlatform
,Service
The non-configured form of JTA platform. This is what is used if none was set up.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Can we currently register aSynchronization
?int
Obtain the current transaction status using whatever means is preferred for this platform@Nullable Object
getTransactionIdentifier
(Transaction transaction) Determine an identifier for the given transaction appropriate for use in caching/lookup usages.void
registerSynchronization
(Synchronization synchronization) Register a JTASynchronization
in the means defined by the platform.@Nullable TransactionManager
Locate theTransactionManager
.@Nullable UserTransaction
Locate theUserTransaction
.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
NoJtaPlatform
public NoJtaPlatform()
-
-
Method Details
-
retrieveTransactionManager
Description copied from interface:JtaPlatform
Locate theTransactionManager
.- Specified by:
retrieveTransactionManager
in interfaceJtaPlatform
- Returns:
- The
TransactionManager
-
retrieveUserTransaction
Description copied from interface:JtaPlatform
Locate theUserTransaction
.If
TransactionSettings.PREFER_USER_TRANSACTION
is enabled, Hibernate will use theUserTransaction
in preference to theTransactionManager
where possible.- Specified by:
retrieveUserTransaction
in interfaceJtaPlatform
- Returns:
- The
UserTransaction
-
getTransactionIdentifier
Description copied from interface:JtaPlatform
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.
- Specified by:
getTransactionIdentifier
in interfaceJtaPlatform
- Parameters:
transaction
- The transaction to be identified.- Returns:
- An appropriate identifier
-
registerSynchronization
Description copied from interface:JtaPlatform
Register a JTASynchronization
in the means defined by the platform.- Specified by:
registerSynchronization
in interfaceJtaPlatform
- Parameters:
synchronization
- The synchronization to register
-
canRegisterSynchronization
public boolean canRegisterSynchronization()Description copied from interface:JtaPlatform
Can we currently register aSynchronization
?- Specified by:
canRegisterSynchronization
in interfaceJtaPlatform
- Returns:
- True if registering a
Synchronization
is currently allowed; false otherwise.
-
getCurrentStatus
Description copied from interface:JtaPlatform
Obtain the current transaction status using whatever means is preferred for this platform- Specified by:
getCurrentStatus
in interfaceJtaPlatform
- Returns:
- The current status.
- Throws:
SystemException
- Indicates a problem access the underlying status
-