All pastes #229420 Raw Edit

Anonymous

public text v1 · immutable
#229420 ·published 2006-10-30 17:58 UTC
rendered paste body
  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();
  }