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

org.apache.ibatis.solon.tran.SolonManagedTransactionFactory Maven / Gradle / Ivy

There is a newer version: 3.0.0-M4
Show newest version
package org.apache.ibatis.solon.tran;

import org.apache.ibatis.session.TransactionIsolationLevel;
import org.apache.ibatis.transaction.Transaction;
import org.apache.ibatis.transaction.TransactionFactory;

import javax.sql.DataSource;
import java.sql.Connection;
import java.util.Properties;

/**
 * @author noear
 * @since 1.6
 */
public class SolonManagedTransactionFactory implements TransactionFactory {
    @Override
    public void setProperties(Properties properties) {

    }

    @Override
    public Transaction newTransaction(Connection connection) {
        throw new UnsupportedOperationException("New Solon transactions require a DataSource");
    }

    @Override
    public Transaction newTransaction(DataSource dataSource, TransactionIsolationLevel transactionIsolationLevel, boolean b) {
        return new SolonManagedTransaction(dataSource);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy