public synchronized PooledConnection getConnection() {
        synchronized (isConnectionInUse) {
            for(Map.Entry<PooledConnection, Boolean> connectionBooleanEntry : isConnectionInUse.entrySet()) {
                if(!connectionBooleanEntry.getValue()) {
                    isConnectionInUse.put(connectionBooleanEntry.getKey(), true);
                    return connectionBooleanEntry.getKey();
                }
            }

            //No free connection => Check if we can create a new one
            if(isConnectionInUse.size() < maxConnections) {
                PooledConnection pooledConnection = new PooledConnection(this);
                pooledConnection.connect(this.hostname, this.portnmbr, this.database, this.username, this.password);
                isConnectionInUse.put(pooledConnection, true);

                return pooledConnection;
            } else {
                throw new RuntimeException("Requested a Connection but the Pool is busy");
            }
        }
	}