Search in sources :

Example 1 with LRARecoveryModule

use of io.narayana.lra.coordinator.internal.LRARecoveryModule in project narayana by jbosstm.

the class LRAService method enableRecovery.

/**
 * When the deployment is loaded register for recovery
 *
 * @param init a javax.servlet.ServletContext
 */
void enableRecovery(@Observes @Initialized(ApplicationScoped.class) Object init) {
    assert lraRecoveryModule == null;
    if (LRALogger.logger.isDebugEnabled())
        LRALogger.logger.debugf("LRAServicve.enableRecovery%n");
    lraRecoveryModule = new LRARecoveryModule(this);
    RecoveryManager.manager().addModule(lraRecoveryModule);
    Implementations.install();
    lraRecoveryModule.getRecoveringLRAs(recoveringLRAs);
    for (Transaction transaction : recoveringLRAs.values()) transaction.getRecoveryCoordinatorUrls(participants);
}
Also used : LRARecoveryModule(io.narayana.lra.coordinator.internal.LRARecoveryModule) Transaction(io.narayana.lra.coordinator.domain.model.Transaction)

Aggregations

Transaction (io.narayana.lra.coordinator.domain.model.Transaction)1 LRARecoveryModule (io.narayana.lra.coordinator.internal.LRARecoveryModule)1