public static boolean updateUser(User user) throws SQLException, NamingException, NoSuchAlgorithmException
	{
		int result;

		PreparedStatement stmt = null;
		ResultSet rs = null;
		
		DataSource ds = getDataSource();
	    
		try {
			conn = ds.getConnection();

			// 질의 준비
			stmt = conn.prepareStatement(
					"UPDATE users " +
					"SET pw=md5(?), name=?, email=?, tel=?, gender=?, start=?" +
					"WHERE id=?"
					);
			stmt.setString(1,  user.getPw());
			stmt.setString(2,  user.getName());
			stmt.setString(3,  user.getEmail());
			stmt.setString(4,  user.getTel());
			stmt.setString(5,  user.getGender());
			stmt.setString(6,  user.getStart());
			stmt.setString(7,  user.getId());
			
			result = stmt.executeUpdate();
		} finally {
			// 무슨 일이 있어도 리소스를 제대로 종료
			if (rs != null) try{rs.close();} catch(SQLException e) {}
			if (stmt != null) try{stmt.close();} catch(SQLException e) {}
			if (conn != null) try{conn.close();} catch(SQLException e) {}
		}
		
		return (result == 1);		
	}