All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.atomikos.recovery.tcc.rest.TccRestTransactionServicePlugin Maven / Gradle / Ivy

There is a newer version: 4.0.6
Show newest version
/**
 * Copyright (C) 2000-2017 Atomikos 
 *
 * LICENSE CONDITIONS
 *
 * See http://www.atomikos.com/Main/WhichLicenseApplies for details.
 */

package com.atomikos.recovery.tcc.rest;

import java.util.Properties;

import com.atomikos.icatch.TransactionServicePlugin;
import com.atomikos.icatch.config.Configuration;
import com.atomikos.recovery.RecoveryLog;

public class TccRestTransactionServicePlugin implements TransactionServicePlugin {
	
	@Override
	public void beforeInit(Properties properties) {
		Configuration.addResource(new TccRecoverableResource());
	}
	

	@Override
	public void afterInit() {
		RecoveryLog recoveryLog = Configuration.getRecoveryLog();
		if (recoveryLog != null) {
			DefaultTccTransport defaultTccTransport = new DefaultTccTransport();
			TccRecoveryManager.installTccRecoveryManager(recoveryLog, defaultTccTransport);
		}	
	}
	
	@Override
	public void afterShutdown() {
		Configuration.removeResource(TccRecoverableResource.NAME);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy