@Override public void saveAccount(Account account) throws DAOException { Connection connect = null; PreparedStatement preparedStatement = null; try { connect = ConnectionPool.getPool().getConnection(); preparedStatement = connect.prepareStatement(SAVE_ACCOUNT_SQL); preparedStatement.setString(1, account.getEmail()); preparedStatement.setString(2, account.getPassword()); preparedStatement.setString(3, account.getFirstName()); preparedStatement.setString(4, account.getLastName()); preparedStatement.setString(5, account.getMiddleName()); preparedStatement.executeUpdate(); } catch (Exception e) { throw new DAOException(e); } finally { ConnectionPool.releaseConnection(connect, preparedStatement); } }