Search in sources :

Example 11 with SqlMapClientImpl

use of com.ibatis.sqlmap.engine.impl.SqlMapClientImpl 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)

Example 12 with SqlMapClientImpl

use of com.ibatis.sqlmap.engine.impl.SqlMapClientImpl in project pinpoint by naver.

the class SqlMapClientIT method deleteShouldBeTraced.

@Test
public void deleteShouldBeTraced() throws Exception {
    SqlMapClient sqlMapClient = new SqlMapClientImpl(super.mockSqlMapExecutorDelegate);
    super.testAndVerifyDelete(sqlMapClient);
}
Also used : SqlMapClientImpl(com.ibatis.sqlmap.engine.impl.SqlMapClientImpl) SqlMapClient(com.ibatis.sqlmap.client.SqlMapClient) Test(org.junit.Test)

Example 13 with SqlMapClientImpl

use of com.ibatis.sqlmap.engine.impl.SqlMapClientImpl in project pinpoint by naver.

the class SqlMapClientIT method methodCallWithNullSqlIdShouldOnlyTraceMethodName.

@Test
public void methodCallWithNullSqlIdShouldOnlyTraceMethodName() throws Exception {
    SqlMapClient sqlMapClient = new SqlMapClientImpl(super.mockSqlMapExecutorDelegate);
    super.testAndVerifyInsertWithNullSqlId(sqlMapClient);
}
Also used : SqlMapClientImpl(com.ibatis.sqlmap.engine.impl.SqlMapClientImpl) SqlMapClient(com.ibatis.sqlmap.client.SqlMapClient) Test(org.junit.Test)

Example 14 with SqlMapClientImpl

use of com.ibatis.sqlmap.engine.impl.SqlMapClientImpl in project pinpoint by naver.

the class SqlMapClientIT method updateShouldBeTraced.

@Test
public void updateShouldBeTraced() throws Exception {
    SqlMapClient sqlMapClient = new SqlMapClientImpl(super.mockSqlMapExecutorDelegate);
    super.testAndVerifyUpdate(sqlMapClient);
}
Also used : SqlMapClientImpl(com.ibatis.sqlmap.engine.impl.SqlMapClientImpl) SqlMapClient(com.ibatis.sqlmap.client.SqlMapClient) Test(org.junit.Test)

Example 15 with SqlMapClientImpl

use of com.ibatis.sqlmap.engine.impl.SqlMapClientImpl in project pinpoint by naver.

the class SqlMapSessionIT method setUp.

@Before
public void setUp() throws Exception {
    super.setUp();
    this.sqlMapClient = new SqlMapClientImpl(super.mockSqlMapExecutorDelegate);
}
Also used : SqlMapClientImpl(com.ibatis.sqlmap.engine.impl.SqlMapClientImpl) Before(org.junit.Before)

Aggregations

SqlMapClientImpl (com.ibatis.sqlmap.engine.impl.SqlMapClientImpl)15 SqlMapClient (com.ibatis.sqlmap.client.SqlMapClient)8 Test (org.junit.Test)8 User (com.alibaba.druid.spring.User)2 SqlMapClientWrapper (com.alibaba.druid.support.ibatis.SqlMapClientWrapper)2 RowHandler (com.ibatis.sqlmap.client.event.RowHandler)2 Before (org.junit.Before)2 SqlMapExecutorWrapper (com.alibaba.druid.support.ibatis.SqlMapExecutorWrapper)1 SqlMapSessionWrapper (com.alibaba.druid.support.ibatis.SqlMapSessionWrapper)1 SqlMapSessionImpl (com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl)1 SessionScope (com.ibatis.sqlmap.engine.scope.SessionScope)1 Field (java.lang.reflect.Field)1