public static synchronized IMySQLConnection getConnection(String databaseName) throws MySQLException, SQLException {
		
		if(sPools == null) { throw new MySQLException("No pool for database: " + databaseName); }

		MySQLConnectionPool pool = sPools.get(databaseName);
		if(pool == null) { throw new MySQLException("No pool for database: " + databaseName); }

		IMySQLConnection conn = pool.getConnection();
		MySQLReusableConnection mySQLReusableConnection = new MySQLReusableConnection();
		if(mySQLReusableConnection.accept(conn))
		{
			return mySQLReusableConnection;
		}
		else {
			throw new MySQLException("No connections available");
		}
	}