Class WildFlyCustomJtaPlatform

  • All Implemented Interfaces:
    Serializable, org.hibernate.engine.transaction.jta.platform.internal.JtaSynchronizationStrategy, 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 WildFlyCustomJtaPlatform
    extends org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform
    implements org.hibernate.engine.transaction.jta.platform.internal.JtaSynchronizationStrategy
    WildFlyCustomJtaPlatform can obtain the Jakarta Transactions TransactionSynchronizationRegistry to be used by Hibernate ORM Jakarta Persistence + native applications. For Jakarta Persistence applications, we could of passed the TransactionSynchronizationRegistry into the constructor but Hibernate native apps wouldn't be able to do that, so this covers all app types.
    Author:
    Scott Marlow
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform

        AS4_TM_NAME, AS7_TM_NAME, JBOSS_UT_NAME, UT_NAME
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canRegisterSynchronization()  
      protected org.hibernate.engine.transaction.jta.platform.internal.JtaSynchronizationStrategy getSynchronizationStrategy()  
      void registerSynchronization​(jakarta.transaction.Synchronization synchronization)  
      static void setTransactionSynchronizationRegistry​(jakarta.transaction.TransactionSynchronizationRegistry tsr)
      Hibernate native applications cannot know when the TransactionManaTransactionManagerSerger + TransactionSynchronizationRegistry services are stopped but Jakarta Persistence container managed applications can and will call setTransactionSynchronizationRegistry with the new (global) TransactionSynchronizationRegistry to use.
      • Methods inherited from class org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform

        canCacheTransactionManagerByDefault, canCacheUserTransactionByDefault, locateTransactionManager, locateUserTransaction
      • Methods inherited from class org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform

        canCacheTransactionManager, canCacheUserTransaction, configure, getCurrentStatus, getTransactionIdentifier, getTransactionManager, injectServices, jndiService, retrieveTransactionManager, retrieveUserTransaction, serviceRegistry
    • Constructor Detail

      • WildFlyCustomJtaPlatform

        public WildFlyCustomJtaPlatform()
    • Method Detail

      • registerSynchronization

        public void registerSynchronization​(jakarta.transaction.Synchronization synchronization)
        Specified by:
        registerSynchronization in interface org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform
        Specified by:
        registerSynchronization in interface org.hibernate.engine.transaction.jta.platform.internal.JtaSynchronizationStrategy
        Overrides:
        registerSynchronization in class org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform
      • canRegisterSynchronization

        public boolean canRegisterSynchronization()
        Specified by:
        canRegisterSynchronization in interface org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform
        Specified by:
        canRegisterSynchronization in interface org.hibernate.engine.transaction.jta.platform.internal.JtaSynchronizationStrategy
        Overrides:
        canRegisterSynchronization 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
      • setTransactionSynchronizationRegistry

        public static void setTransactionSynchronizationRegistry​(jakarta.transaction.TransactionSynchronizationRegistry tsr)
        Hibernate native applications cannot know when the TransactionManaTransactionManagerSerger + TransactionSynchronizationRegistry services are stopped but Jakarta Persistence container managed applications can and will call setTransactionSynchronizationRegistry with the new (global) TransactionSynchronizationRegistry to use.
        Parameters:
        tsr -