static void testConnection(String url, String query, int maxconn) {
		if (url == null || url.length() == 0 || query == null
				|| query.length() == 0 || maxconn <= 0) {
			testError();
		}
		SimpleConnectionPool pool = null;
		Connection con = null;
		try {
			pool = SimpleConnectionPool.getInstance(maxconn);
			log.info("creating initial connections...");
			con = pool.getConnection(url);
			log.info("got a connection");

			ResultSet rs = SimpleConnectionPool.doQuery(con, query);
			log.info("statement created...");
			log.info("executing query...");

			int count = 0;

			while (rs.next()) {
				++count;
				log.info("row " + count + ": " + rs.getString("productname"));
			}
		} catch (Exception e) {
			log.warning("Error occurred trying to read table: "
					+ e.getClass().getName() + " Message: " + e.getMessage());
		}
		finally {
			pool.returnToPool(con, url);
		}
		pool.closeConnections();
	}