Example usage for org.apache.ibatis.session SqlSessionManager startManagedSession

List of usage examples for org.apache.ibatis.session SqlSessionManager startManagedSession

Introduction

In this page you can find the example usage for org.apache.ibatis.session SqlSessionManager startManagedSession.

Prototype

public void startManagedSession(ExecutorType execType, Connection connection) 

Source Link

Usage

From source file:org.mybatis.cdi.LocalTransactionInterceptor.java

License:Apache License

private boolean start(Transactional transactional) {
    boolean started = false;
    for (SqlSessionManager manager : this.registry.getManagers()) {
        if (!manager.isManagedSessionStarted()) {
            manager.startManagedSession(transactional.executorType(),
                    transactional.isolation().getTransactionIsolationLevel());
            started = true;/*from   w  w w.  j  a  v  a  2 s.  c  o  m*/
        }
    }
    return started;
}

From source file:org.nanoframework.orm.mybatis.MultiTransactionalMethodInterceptor.java

License:Apache License

private void startManagedSession(MultiTransactional transactional, SqlSessionManager[] sqlSessionManager) {
    for (SqlSessionManager manager : sqlSessionManager) {
        if (!manager.isManagedSessionStarted())
            manager.startManagedSession(transactional.executorType(),
                    transactional.isolation().getTransactionIsolationLevel());
    }//from   w  ww .  j  a  v  a2s . c  o  m
}