Interface JtaPlatform

    • Method Detail

      • retrieveTransactionManager

        jakarta.transaction.TransactionManager retrieveTransactionManager()
        Locate the TransactionManager.
        Returns:
        The TransactionManager
      • retrieveUserTransaction

        jakarta.transaction.UserTransaction retrieveUserTransaction()
        Locate the UserTransaction.

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

        Returns:
        The UserTransaction
      • getTransactionIdentifier

        Object getTransactionIdentifier​(jakarta.transaction.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 a Synchronization?
        Returns:
        True if registering a Synchronization is currently allowed; false otherwise.
      • registerSynchronization

        void registerSynchronization​(jakarta.transaction.Synchronization synchronization)
        Register a JTA Synchronization in the means defined by the platform.
        Parameters:
        synchronization - The synchronization to register
      • getCurrentStatus

        int getCurrentStatus()
                      throws jakarta.transaction.SystemException
        Obtain the current transaction status using whatever means is preferred for this platform
        Returns:
        The current status.
        Throws:
        jakarta.transaction.SystemException - Indicates a problem access the underlying status