public static void closeConnection(Connection conn, Statement stat, ResultSet rs) {
		try {
			// 关闭结果集对象.
			if (rs != null && !rs.isClosed()) {
				rs.close();
				rs = null;
			}
		} catch (SQLException e) {
			// 当关闭失败时,记录错误信息,并报告上层代码.
			throw new RuntimeException(e);
		} finally {
			try {
				// 关闭Statement对象.
				if (stat != null && !stat.isClosed()) {
					stat.close();
					stat = null;
				}
			} catch (SQLException e) {
				// 当关闭失败时,记录错误信息,并报告上层代码.
				throw new RuntimeException(e);
			} finally {
				try {
					// 关闭数据库连接.
					if (conn != null && !conn.isClosed()) {
						conn.close();
						conn = null;
					}
				} catch (SQLException e) {
					// 当关闭失败时,记录错误信息,并报告上层代码.
					throw new RuntimeException(e);
				}
			}
		}
	}