try {
Object result = method.invoke(sqlSession, args);
if (!isSqlSessionTransactional(sqlSession, ShardImpl.this.sqlSessionFactory)) {
// force commit even on non-dirty sessions because some databases require
// a commit/rollback before calling close()
sqlSession.commit(true);
}
return result;
} catch (Throwable t) {
Throwable unwrapped = unwrapThrowable(t);
if (ShardImpl.this.exceptionTranslator != null && unwrapped instanceof PersistenceException) {