Class CDISEJtaPlatform

  • 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

    @ApplicationScoped
    public class CDISEJtaPlatform
    extends org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform
    An AbstractJtaPlatform that is an ApplicationScoped CDI managed bean that supplies TransactionManager and UserTransaction instances that are supplied to it at construction time.
    See Also:
    AbstractJtaPlatform, Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      CDISEJtaPlatform​(javax.transaction.TransactionManager transactionManager, javax.transaction.UserTransaction userTransaction)
      Creates a new CDISEJtaPlatform.
    • Constructor Detail

      • CDISEJtaPlatform

        @Inject
        public CDISEJtaPlatform​(javax.transaction.TransactionManager transactionManager,
                                javax.transaction.UserTransaction userTransaction)
        Creates a new CDISEJtaPlatform.
        Parameters:
        transactionManager - the TransactionManager to use; must not be null
        userTransaction - the UserTransaction to use; must not be null
        Throws:
        NullPointerException - if either transactionManager or userTransaction is null
    • Method Detail

      • jndiService

        protected org.hibernate.engine.jndi.spi.JndiService jndiService()
        Throws an UnsupportedOperationException when invoked.
        Overrides:
        jndiService in class org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform
        Returns:
        (not applicable)
        Throws:
        UnsupportedOperationException - when invoked
      • locateUserTransaction

        protected javax.transaction.UserTransaction locateUserTransaction()
        Returns the UserTransaction instance supplied at construction time.

        This method never returns null.

        Specified by:
        locateUserTransaction in class org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform
        Returns:
        a non-null UserTransaction
        See Also:
        CDISEJtaPlatform(TransactionManager, UserTransaction)
      • locateTransactionManager

        protected javax.transaction.TransactionManager locateTransactionManager()
        Returns the TransactionManager instance supplied at construction time.

        This method never returns null.

        Specified by:
        locateTransactionManager in class org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform
        Returns:
        a non-null TransactionManager
        See Also:
        CDISEJtaPlatform(TransactionManager, UserTransaction)