Class ResourceRecoveryManagerImpl

  • All Implemented Interfaces:
    ResourceRecoveryManager, org.glassfish.hk2.api.PostConstruct

    @Service
    public class ResourceRecoveryManagerImpl
    extends Object
    implements org.glassfish.hk2.api.PostConstruct, ResourceRecoveryManager
    Resource recovery manager to recover transactions.
    Author:
    Jagadish Ramu
    • Constructor Detail

      • ResourceRecoveryManagerImpl

        public ResourceRecoveryManagerImpl()
    • Method Detail

      • postConstruct

        public void postConstruct()
        Specified by:
        postConstruct in interface org.glassfish.hk2.api.PostConstruct
      • recoverIncompleteTx

        public boolean recoverIncompleteTx​(boolean delegated,
                                           String logPath)
                                    throws Exception
        recover incomplete transactions
        Specified by:
        recoverIncompleteTx in interface ResourceRecoveryManager
        Parameters:
        delegated - indicates whether delegated recovery is needed
        logPath - transaction log directory path
        Returns:
        boolean indicating the status of transaction recovery
        Throws:
        Exception - when unable to recover
      • recoverIncompleteTx

        public boolean recoverIncompleteTx​(boolean delegated,
                                           String logPath,
                                           String instance,
                                           boolean notifyRecoveryListeners)
                                    throws Exception
        recover incomplete transactions
        Specified by:
        recoverIncompleteTx in interface ResourceRecoveryManager
        Parameters:
        delegated - indicates whether delegated recovery is needed
        logPath - transaction log directory path
        instance - the name of the instance for which delegated recovery is performed, null if unknown.
        notifyRecoveryListeners - specifies whether recovery listeners are to be notified
        Returns:
        boolean indicating the status of transaction recovery
        Throws:
        Exception - when unable to recover
      • recoverXAResources

        public void recoverXAResources​(boolean force)
        recover the xa-resources
        Specified by:
        recoverXAResources in interface ResourceRecoveryManager
        Parameters:
        force - boolean to indicate if it has to be forced.
      • setLazyRecovery

        public void setLazyRecovery​(boolean lazy)
        to enable lazy recovery, setting lazy to "true" will
        Specified by:
        setLazyRecovery in interface ResourceRecoveryManager
        Parameters:
        lazy - boolean
      • registerRecoveryResourceHandler

        public static void registerRecoveryResourceHandler​(XAResource xaResource)