use of com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl in project druid by alibaba.
the class SqlMapClientImplWrapper method getLocalSqlMapSessionWrapper.
protected SqlMapSessionWrapper getLocalSqlMapSessionWrapper() {
try {
if (getLocalSqlMapSessionMethod == null) {
getLocalSqlMapSessionMethod = raw.getClass().getDeclaredMethod("getLocalSqlMapSession");
getLocalSqlMapSessionMethod.setAccessible(true);
}
SqlMapSessionImpl sessionImpl = (SqlMapSessionImpl) getLocalSqlMapSessionMethod.invoke(raw);
IbatisUtils.set(sessionImpl, this);
return new SqlMapSessionWrapper(raw, sessionImpl);
} catch (Exception e) {
throw new IllegalStateException(e.getMessage(), e);
}
}
use of com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl 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();
}
use of com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl in project pinpoint by naver.
the class SqlMapSessionIT method methodCallWithNullSqlIdShouldOnlyTraceMethodName.
@Test
public void methodCallWithNullSqlIdShouldOnlyTraceMethodName() throws Exception {
SqlMapSession sqlMapSession = new SqlMapSessionImpl(this.sqlMapClient);
super.testAndVerifyInsertWithNullSqlId(sqlMapSession);
}
use of com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl in project pinpoint by naver.
the class SqlMapSessionIT method deleteShouldBeTraced.
@Test
public void deleteShouldBeTraced() throws Exception {
SqlMapSession sqlMapSession = new SqlMapSessionImpl(this.sqlMapClient);
super.testAndVerifyDelete(sqlMapSession);
}
use of com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl in project pinpoint by naver.
the class SqlMapSessionIT method queryForMapShouldBeTraced.
@Test
public void queryForMapShouldBeTraced() throws Exception {
SqlMapSession sqlMapSession = new SqlMapSessionImpl(this.sqlMapClient);
super.testAndVerifyQueryForMap(sqlMapSession);
}
Aggregations