com.sun.enterprise.transaction.jts
Class ResourceRecoveryManagerImpl

java.lang.Object
  extended by com.sun.enterprise.transaction.jts.ResourceRecoveryManagerImpl
All Implemented Interfaces:
ResourceRecoveryManager, org.jvnet.hk2.component.PostConstruct

@Service
public class ResourceRecoveryManagerImpl
extends java.lang.Object
implements org.jvnet.hk2.component.PostConstruct, ResourceRecoveryManager

Resource recovery manager to recover transactions.

Author:
Jagadish Ramu

Constructor Summary
ResourceRecoveryManagerImpl()
           
 
Method Summary
 void postConstruct()
           
 boolean recoverIncompleteTx(boolean delegated, java.lang.String logPath)
          recover incomplete transactions
 boolean recoverIncompleteTx(boolean delegated, java.lang.String logPath, java.lang.String instance, boolean notifyRecoveryListeners)
          recover incomplete transactions
 void recoverXAResources()
          to recover xa resources
 void recoverXAResources(boolean force)
          recover the xa-resources
static void registerRecoveryResourceHandler(XAResource xaResource)
           
 void setLazyRecovery(boolean lazy)
          to enable lazy recovery, setting lazy to "true" will
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceRecoveryManagerImpl

public ResourceRecoveryManagerImpl()
Method Detail

postConstruct

public void postConstruct()
Specified by:
postConstruct in interface org.jvnet.hk2.component.PostConstruct

recoverIncompleteTx

public boolean recoverIncompleteTx(boolean delegated,
                                   java.lang.String logPath)
                            throws java.lang.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:
java.lang.Exception - when unable to recover

recoverIncompleteTx

public boolean recoverIncompleteTx(boolean delegated,
                                   java.lang.String logPath,
                                   java.lang.String instance,
                                   boolean notifyRecoveryListeners)
                            throws java.lang.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:
java.lang.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

recoverXAResources

public void recoverXAResources()
to recover xa resources

Specified by:
recoverXAResources in interface ResourceRecoveryManager

registerRecoveryResourceHandler

public static void registerRecoveryResourceHandler(XAResource xaResource)


Copyright © 2012 GlassFish Community. All Rights Reserved.