src/main/java/org/jboss/util/xml/catalog/CatalogManager.java
public Catalog getPrivateCatalog() {
    Catalog catalog = staticCatalog;

    if (useStaticCatalog == null) {
      useStaticCatalog = new Boolean(getUseStaticCatalog());
    }

    if (catalog == null || !useStaticCatalog.booleanValue()) {

      try {
	String catalogClassName = getCatalogClassName();

	if (catalogClassName == null) {
	  catalog = new Catalog();
	} else {
	  try {
	    catalog = (Catalog) Class.forName(catalogClassName).newInstance();
	  } catch (ClassNotFoundException cnfe) {
	    debug.message(1,"Catalog class named '"
			  + catalogClassName
			  + "' could not be found. Using default.");
	    catalog = new Catalog();
	  } catch (ClassCastException cnfe) {
	    debug.message(1,"Class named '"
			  + catalogClassName
		  + "' is not a Catalog. Using default.");
	    catalog = new Catalog();
	  }
	}

	catalog.setCatalogManager(this);
	catalog.setupReaders();
	catalog.loadSystemCatalogs();
      } catch (Exception ex) {
	ex.printStackTrace();
      }

      if (useStaticCatalog.booleanValue()) {
	staticCatalog = catalog;
      }
    }

    return catalog;
  }
public Catalog getPrivateCatalog() {
    Catalog catalog = staticCatalog;

    if (useStaticCatalog == null) {
      useStaticCatalog = new Boolean(getUseStaticCatalog());
    }

    if (catalog == null || !useStaticCatalog.booleanValue()) {

      try {
	String catalogClassName = getCatalogClassName();

	if (catalogClassName == null) {
	  catalog = new Catalog();
	} else {
	  try {
	    catalog = (Catalog) Class.forName(catalogClassName).newInstance();
	  } catch (ClassNotFoundException cnfe) {
	    debug.message(1,"Catalog class named '"
			  + catalogClassName
			  + "' could not be found. Using default.");
	    catalog = new Catalog();
	  } catch (ClassCastException cnfe) {
	    debug.message(1,"Class named '"
			  + catalogClassName
		  + "' is not a Catalog. Using default.");
	    catalog = new Catalog();
	  }
	}

	catalog.setCatalogManager(this);
	catalog.setupReaders();
	catalog.loadSystemCatalogs();
      } catch (Exception ex) {
	ex.printStackTrace();
      }

      if (useStaticCatalog.booleanValue()) {
	staticCatalog = catalog;
      }
    }

    return catalog;
  }
@return a new catalog instance.

This method always returns a new instance of the underlying catalog class.