Search in sources :

Example 1 with SqlMapSessionWrapper

use of com.alibaba.druid.support.ibatis.SqlMapSessionWrapper in project druid by alibaba.

the class SqlMapSessionWrapperTest method test_wrap.

@SuppressWarnings("deprecation")
public void test_wrap() throws Exception {
    SqlMapClientImpl client = (SqlMapClientImpl) context.getBean("master-sqlMapClient");
    Assert.assertNotNull(client);
    SqlMapSessionImpl session = new SqlMapSessionImpl(client);
    SqlMapSessionWrapper wrapper = new SqlMapSessionWrapper(client, session);
    wrapper.startTransaction();
    wrapper.commitTransaction();
    wrapper.getDataSource();
    wrapper.getCurrentConnection();
    wrapper.getUserConnection();
    wrapper.close();
}
Also used : SqlMapClientImpl(com.ibatis.sqlmap.engine.impl.SqlMapClientImpl) SqlMapSessionWrapper(com.alibaba.druid.support.ibatis.SqlMapSessionWrapper) SqlMapSessionImpl(com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl)

Aggregations

SqlMapSessionWrapper (com.alibaba.druid.support.ibatis.SqlMapSessionWrapper)1 SqlMapClientImpl (com.ibatis.sqlmap.engine.impl.SqlMapClientImpl)1 SqlMapSessionImpl (com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl)1