public int insert(String statementName, Object parameterObject) throws DaoException { Integer result; System.out.println("INSIDE THE INSERT NOW"); try { sqlMap.startTransaction(); result = (Integer) sqlMap.insert(statementName, parameterObject); sqlMap.commitTransaction(); log.info("inserted record"); } catch (SQLException e) { try { sqlMap.endTransaction(); } catch (SQLException ex) { throw new DaoException(ex.fillInStackTrace()); } throw new DaoException(e.fillInStackTrace()); } finally { try { sqlMap.endTransaction(); } catch(SQLException sqle) {} } System.out.println("RESULT: " + result); System.out.println("result value: " + result.intValue()); return result.intValue(); }