public static Connection getConnection() {
		if (connectionList == null) {
			connectionList = new Connection[maxConnections];
			connectionInUse = new boolean[maxConnections];
			for (int i = 0; i < maxConnections; i++) {
				connectionInUse[i] = false;
			}
		}
		boolean allInUse = true;
		int empty = -1;
		for (int i = 0; i < maxConnections; i++) {
			if (connectionInUse[i] == false) {
				allInUse = false;
				empty = i;
				connectionInUse[i] = true;
				break;
			}
		}
		if (!allInUse) {
			if (connectionList[empty] == null) {
				Connection conn = getConn();
				connectionList[empty] = conn;
			}
			if (debug)
				System.out.println("Get a connection in pool[" + empty + "]");
			return connectionList[empty];
		} else {
			if (debug)
				System.out.println("Too many connections!");
			return null;
		}

	}