Class TestingJtaPlatformImpl

java.lang.Object
org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform
org.hibernate.testing.jta.TestingJtaPlatformImpl
All Implemented Interfaces:
Serializable, org.hibernate.engine.transaction.jta.platform.internal.TransactionManagerAccess, org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform, org.hibernate.service.Service, org.hibernate.service.spi.Configurable, org.hibernate.service.spi.ServiceRegistryAwareService

public class TestingJtaPlatformImpl extends org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform
A test-specific implementation of the JtaPlatform contract for testing JTA-based functionality.
See Also:
  • Field Details

  • Constructor Details

    • TestingJtaPlatformImpl

      public TestingJtaPlatformImpl()
  • Method Details

    • transactionManager

      public static TransactionManager transactionManager()
    • userTransaction

      public static UserTransaction userTransaction()
    • synchronizationRegistry

      public static TransactionSynchronizationRegistry synchronizationRegistry()
    • tryCommit

      public static void tryCommit() throws Exception
      Used by envers...
      Throws:
      Exception
    • inNoopJtaTransaction

      public static void inNoopJtaTransaction(TransactionManager tm, Runnable action) throws Exception
      Throws:
      Exception
    • inJtaTransaction

      public static void inJtaTransaction(TransactionManager tm, Runnable action) throws Exception
      Throws:
      Exception
    • inJtaTransaction

      public static void inJtaTransaction(TransactionManager tm, int timeout, Runnable action) throws Exception
      Throws:
      Exception
    • locateTransactionManager

      protected TransactionManager locateTransactionManager()
      Specified by:
      locateTransactionManager in class org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform
    • canCacheTransactionManager

      protected boolean canCacheTransactionManager()
      Overrides:
      canCacheTransactionManager in class org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform
    • locateUserTransaction

      protected UserTransaction locateUserTransaction()
      Specified by:
      locateUserTransaction in class org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform
    • canCacheUserTransaction

      protected boolean canCacheUserTransaction()
      Overrides:
      canCacheUserTransaction in class org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform
    • getSynchronizationStrategy

      protected org.hibernate.engine.transaction.jta.platform.internal.JtaSynchronizationStrategy getSynchronizationStrategy()
      Overrides:
      getSynchronizationStrategy in class org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform