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

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

Introduction

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

Prototype

public boolean isManagedSessionStarted() 

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  a2 s  .c o  m
        }
    }
    return started;
}

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

License:Apache License

private boolean isManagedSessionStarted(SqlSessionManager[] sqlSessionManager) {
    for (SqlSessionManager manager : sqlSessionManager) {
        if (!manager.isManagedSessionStarted())
            return false;

    }//from   ww w . jav a  2 s .co  m

    return true;
}

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 w  w  .java  2 s. c  o m*/
}