@Override
	public String[] getUsersForService(String serviceName) {
		ResultSet rs, rsSearch;
		PreparedStatement statement, searchService;
		List<String> usersList = new ArrayList<String>();

		try {
			// find active sellers
			statement = connection.prepareStatement("SELECT * FROM Users "
					+ "WHERE type = ? AND status = ?");
			statement.setString(1, "seller");
			statement.setString(2, WebServerInfo.active);

			rs = statement.executeQuery();

			// find if the active seller provides a certain service
			while (rs.next()) {
				searchService = connection.prepareStatement("SELECT * "
						+ "FROM ServicesSellers "
						+ "WHERE username = ? AND service = ?");
				System.out.println("Selected user " + rs.getString("username"));
				searchService.setString(1, rs.getString("username"));
				searchService.setString(2, serviceName);

				rsSearch = searchService.executeQuery();

				// get the name of the user that provides the service
				if (rsSearch.next()) {
					usersList.add(rsSearch.getString("username"));
				}

				rsSearch.close();
			}

			rs.close();

		} catch (SQLException e) {
			e.printStackTrace();
		}

		return Arrays.copyOf(usersList.toArray(), usersList.size(), String[].class);
	}