Class MockTransactionServices

  • All Implemented Interfaces:
    org.jboss.weld.bootstrap.api.Service, org.jboss.weld.transaction.spi.TransactionServices

    public class MockTransactionServices
    extends Object
    implements org.jboss.weld.transaction.spi.TransactionServices
    A mock version of TransactionServices for RI unit tests. Since no JTA transaction can be active for these unit tests, all methods here are empty.
    Author:
    David Allen
    • Constructor Detail

      • MockTransactionServices

        public MockTransactionServices()
    • Method Detail

      • isTransactionActive

        public boolean isTransactionActive()
        Specified by:
        isTransactionActive in interface org.jboss.weld.transaction.spi.TransactionServices
      • registerSynchronization

        public void registerSynchronization​(jakarta.transaction.Synchronization synchronizedObserver)
        Specified by:
        registerSynchronization in interface org.jboss.weld.transaction.spi.TransactionServices
      • getUserTransaction

        public jakarta.transaction.UserTransaction getUserTransaction()
        Specified by:
        getUserTransaction in interface org.jboss.weld.transaction.spi.TransactionServices
      • cleanup

        public void cleanup()
        Specified by:
        cleanup in interface org.jboss.weld.bootstrap.api.Service