Class TransactionManagerDelegate

    • Constructor Detail

      • TransactionManagerDelegate

        public TransactionManagerDelegate()
        Construct the delegate with the appropriate transaction manager
    • Method Detail

      • getTransactionTimeout

        public int getTransactionTimeout()
                                  throws SystemException
        Get the transaction timeout.
        Specified by:
        getTransactionTimeout in interface org.jboss.tm.TransactionTimeoutConfiguration
        Returns:
        the timeout in seconds associated with this thread
        Throws:
        SystemException - for any error
      • getTimeLeftBeforeTransactionTimeout

        public long getTimeLeftBeforeTransactionTimeout​(boolean errorRollback)
                                                 throws RollbackException
        Get the time left before transaction timeout
        Specified by:
        getTimeLeftBeforeTransactionTimeout in interface org.jboss.tm.TransactionTimeoutConfiguration
        Parameters:
        errorRollback - throw an error if the transaction is marked for rollback
        Returns:
        the remaining in the current transaction or -1 if there is no transaction
        Throws:
        RollbackException - if the transaction is marked for rollback and errorRollback is true
      • getObjectInstance

        public Object getObjectInstance​(Object initObj,
                                        Name relativeName,
                                        Context namingContext,
                                        Hashtable env)
                                 throws Exception
        Get the transaction manager from the factory.
        Specified by:
        getObjectInstance in interface ObjectFactory
        Parameters:
        initObj - The initialisation object.
        relativeName - The instance name relative to the context.
        namingContext - The naming context for the instance.
        env - The environment.
        Throws:
        Exception