Class WildFlyCustomJtaPlatform

java.lang.Object
org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform
org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform
org.jboss.as.jpa.hibernate.service.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:
  • 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
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    protected org.hibernate.engine.transaction.jta.platform.internal.JtaSynchronizationStrategy
     
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WildFlyCustomJtaPlatform

      public WildFlyCustomJtaPlatform()
  • Method Details

    • 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 -