SqlSessionFactory sqlMapperWithMultipleHandlers = new DefaultSqlSessionFactory(configuration);
SqlSession sqlSession = sqlMapperWithMultipleHandlers.openSession();
try {
DefaultResultHandler handler1 = new DefaultResultHandler();
DefaultResultHandler handler2 = new DefaultResultHandler();
AuthorMapperWithMultipleHandlers mapper = sqlSession.getMapper(AuthorMapperWithMultipleHandlers.class);
mapper.selectAuthor(101, handler1, handler2);
} finally {
sqlSession.close();
}
}