public List getList(String statementName, Object parameterObject) throws SQLException {
List list = null;
try {
sqlMap.startTransaction();
list = sqlMap.queryForList(statementName, parameterObject);
sqlMap.commitTransaction();
} finally {
sqlMap.endTransaction();
}
return list;
}
Clinton
On 11/21/05, Scott Purcell <[EMAIL PROTECTED]> wrote:
Hello,
I have the following snippet from an example Ibatis 1.x and I am trying to recreate it in 2.0. I am new, and just getting underway. Problem is today, I cannot find a replacement for the line sqlMap.rollbackTransaction(),
I have the API up, and under sqlMapClient cannot find a rollback replacement. Could someone give me some ideas here?
(converting this to 2.0)
public List getList(String statementName, Object parameterObject) throws DaoException {
List list = null;
try {
sqlMap.startTransaction();
list = sqlMap.queryForList(statementName, parameterObject);
sqlMap.commitTransaction();
} catch (SQLException e) {
try {
sqlMap.rollbackTransaction();
} catch (SQLException ex) {
throw new DaoException(ex.fillInStackTrace());
}
throw new DaoException(e.fillInStackTrace());
}
return list;
}
