io.ebeaninternal.server.transaction.ExternalTransactionScopeManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebean Show documentation
Show all versions of ebean Show documentation
composite of common runtime dependencies for all platforms
package io.ebeaninternal.server.transaction;
import io.ebean.config.ExternalTransactionManager;
import io.ebeaninternal.api.SpiTransaction;
/**
* A TransactionScopeManager aware of external transaction managers.
*/
public class ExternalTransactionScopeManager extends DefaultTransactionScopeManager {
private final ExternalTransactionManager externalManager;
/**
* Instantiates transaction scope manager.
*/
public ExternalTransactionScopeManager(ExternalTransactionManager externalManager) {
this.externalManager = externalManager;
}
@Override
public void register(TransactionManager manager) {
externalManager.setTransactionManager(manager);
}
@Override
public SpiTransaction getActive() {
return (SpiTransaction) externalManager.getCurrentTransaction();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy