Class NoTxResourceManagerImpl

  • All Implemented Interfaces:
    ResourceManager

    public class NoTxResourceManagerImpl
    extends Object
    implements ResourceManager
    Resource Manager for a resource request from a component that is not to be associated with a transaction.
    Author:
    Aditya Gore
    • Constructor Detail

      • NoTxResourceManagerImpl

        public NoTxResourceManagerImpl()
    • Method Detail

      • getTransaction

        public jakarta.transaction.Transaction getTransaction()
                                                       throws PoolingException
        Returns null since this connection is outside any tx context
        Specified by:
        getTransaction in interface ResourceManager
        Returns:
        An instance of Transaction object.
        Throws:
        PoolingException - when unable to get current transaction
      • getComponent

        public Object getComponent()
        Returns the component invoking resource request.
        Specified by:
        getComponent in interface ResourceManager
        Returns:
        Handle to the component
      • rollBackTransaction

        public void rollBackTransaction()
        Get's the component's transaction and marks it for rolling back. This implementation of the method is expected to be a no-op
        Specified by:
        rollBackTransaction in interface ResourceManager
      • delistResource

        public void delistResource​(ResourceHandle resource,
                                   int xaresFlag)
        delist the ResourceHandle from the transaction This implementation of the method is expected to be a no-op
        Specified by:
        delistResource in interface ResourceManager
        Parameters:
        resource - ResourceHandle object
        xaresFlag - flag indicating transaction success. This can be XAResource.TMSUCCESS or XAResource.TMFAIL
      • unregisterResource

        public void unregisterResource​(ResourceHandle resource,
                                       int xaresFlag)
        Unregister the ResourceHandle from the transaction This implementation of the method is expected to be a no-op
        Specified by:
        unregisterResource in interface ResourceManager
        Parameters:
        resource - ResourceHandle object
        xaresFlag - flag indicating transaction success. This can be XAResource.TMSUCCESS or XAResource.TMFAIL
      • logFine

        public void logFine​(String message)