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 void
postConstruct()
boolean
recoverIncompleteTx(boolean delegated, String logPath)
recover incomplete transactionsboolean
recoverIncompleteTx(boolean delegated, String logPath, String instance, boolean notifyRecoveryListeners)
recover incomplete transactionsvoid
recoverXAResources()
to recover xa resourcesvoid
recoverXAResources(boolean force)
recover the xa-resourcesstatic void
registerRecoveryResourceHandler(XAResource xaResource)
void
setLazyRecovery(boolean lazy)
to enable lazy recovery, setting lazy to "true" will
-
-
-
Method Detail
-
postConstruct
public void postConstruct()
- Specified by:
postConstruct
in interfaceorg.glassfish.hk2.api.PostConstruct
-
recoverIncompleteTx
public boolean recoverIncompleteTx(boolean delegated, String logPath) throws Exception
recover incomplete transactions- Specified by:
recoverIncompleteTx
in 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 Exception
recover incomplete transactions- Specified by:
recoverIncompleteTx
in 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:
recoverXAResources
in 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:
setLazyRecovery
in interfaceResourceRecoveryManager
- Parameters:
lazy
- boolean
-
recoverXAResources
public void recoverXAResources()
to recover xa resources- Specified by:
recoverXAResources
in interfaceResourceRecoveryManager
-
registerRecoveryResourceHandler
public static void registerRecoveryResourceHandler(XAResource xaResource)
-
-