Class ResourceRecoveryManagerImpl
- java.lang.Object
-
- com.sun.enterprise.transaction.jts.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 Summary
Constructors Constructor Description ResourceRecoveryManagerImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpostConstruct()booleanrecoverIncompleteTx(boolean delegated, String logPath)recover incomplete transactionsbooleanrecoverIncompleteTx(boolean delegated, String logPath, String instance, boolean notifyRecoveryListeners)recover incomplete transactionsvoidrecoverXAResources()to recover xa resourcesvoidrecoverXAResources(boolean force)recover the xa-resourcesstatic voidregisterRecoveryResourceHandler(XAResource xaResource)voidsetLazyRecovery(boolean lazy)to enable lazy recovery, setting lazy to "true" will
-
-
-
Method Detail
-
postConstruct
public void postConstruct()
- Specified by:
postConstructin interfaceorg.glassfish.hk2.api.PostConstruct
-
recoverIncompleteTx
public boolean recoverIncompleteTx(boolean delegated, String logPath) throws Exceptionrecover incomplete transactions- Specified by:
recoverIncompleteTxin interfaceResourceRecoveryManager- Parameters:
delegated- indicates whether delegated recovery is neededlogPath- 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 Exceptionrecover incomplete transactions- Specified by:
recoverIncompleteTxin interfaceResourceRecoveryManager- Parameters:
delegated- indicates whether delegated recovery is neededlogPath- transaction log directory pathinstance- 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:
recoverXAResourcesin interfaceResourceRecoveryManager- 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:
setLazyRecoveryin interfaceResourceRecoveryManager- Parameters:
lazy- boolean
-
recoverXAResources
public void recoverXAResources()
to recover xa resources- Specified by:
recoverXAResourcesin interfaceResourceRecoveryManager
-
registerRecoveryResourceHandler
public static void registerRecoveryResourceHandler(XAResource xaResource)
-
-