package io.ebeaninternal.server.transaction;
import io.ebean.config.dbplatform.DatabasePlatform;
import io.ebeaninternal.api.SpiTransaction;
import java.sql.Connection;
public class ExplicitTransactionManager extends TransactionManager {
public ExplicitTransactionManager(TransactionManagerOptions options) {
super(options);
}
@Override
protected SpiTransaction createTransaction(boolean explicit, Connection c, long id) {
return new ExplicitJdbcTransaction(prefix + id, explicit, c, this);
}
@Override
protected DatabasePlatform.OnQueryOnly initOnQueryOnly(DatabasePlatform.OnQueryOnly dbPlatformOnQueryOnly) {
String systemPropertyValue = System.getProperty("ebean.transaction.onqueryonly");
if (systemPropertyValue != null) {
return DatabasePlatform.OnQueryOnly.valueOf(systemPropertyValue.trim().toUpperCase());
}
return dbPlatformOnQueryOnly == null ? DatabasePlatform.OnQueryOnly.ROLLBACK : dbPlatformOnQueryOnly;
}
}