Example usage for org.apache.ibatis.executor SimpleExecutor SimpleExecutor

List of usage examples for org.apache.ibatis.executor SimpleExecutor SimpleExecutor

Introduction

In this page you can find the example usage for org.apache.ibatis.executor SimpleExecutor SimpleExecutor.

Prototype

public SimpleExecutor(Configuration configuration, Transaction transaction) 

Source Link

Usage

From source file:com.dmm.framework.basedb.apache.ibatis.session.Configuration.java

License:Apache License

public Executor newExecutor(Transaction transaction, ExecutorType executorType) {
    executorType = executorType == null ? defaultExecutorType : executorType;
    executorType = executorType == null ? ExecutorType.SIMPLE : executorType;
    Executor executor;//from   w w  w  .j a v a2s .c o m
    if (ExecutorType.BATCH == executorType) {
        executor = new BatchExecutor(this, transaction);
    } else if (ExecutorType.REUSE == executorType) {
        executor = new ReuseExecutor(this, transaction);
    } else {
        executor = new SimpleExecutor(this, transaction);
    }
    if (cacheEnabled) {
        executor = new CachingExecutor(executor);
    }
    executor = (Executor) interceptorChain.pluginAll(executor);
    return executor;
}

From source file:org.yx.sumk.batis.SqlSessionFactory.java

License:Apache License

public SqlSession session(Connection conn) {

    Transaction transaction = new ManagedTransaction(conn, false);
    SimpleExecutor excutor = new SimpleExecutor(configuration, transaction);
    return new DefaultSqlSession(configuration, excutor);
}