protected synchronized CollectionConfiguration getConfiguration(DBBroker broker,
protected CollectionConfiguration getConfiguration(DBBroker broker,
    protected synchronized CollectionConfiguration getConfiguration(DBBroker broker,             Collection collection) throws CollectionConfigurationException {    	LOG.debug("Reading config for " + collection.getName());    	CollectionConfiguration conf = new CollectionConfiguration(collection);    	String path = collection.getName() + '/';    	int p = "/db".length();    	String next;    	Collection coll = null;    	while(p != -1) {    		next = CONFIG_COLLECTION + path.substring(0, p);    		try {    			coll = broker.openCollection(next, Lock.READ_LOCK);    			if (coll != null && coll.getDocumentCount() > 0) {    			    for(Iterator i = coll.iterator(broker); i.hasNext(); ) {    			        DocumentImpl confDoc = (DocumentImpl) i.next();    			        if(confDoc.getFileName().endsWith(CollectionConfiguration.COLLECTION_CONFIG_SUFFIX)) {    			            if(LOG.isDebugEnabled())    			                LOG.debug("Reading config for " + collection.getName() + " from " + confDoc.getName());    			            conf.read(broker, confDoc);    			            break;    			        }    			    }    			}    		} finally {    			if(coll != null)    				coll.release();    		}    		p = path.indexOf('/', p + 1);	    }    	cache.put(collection.getName(), conf);        return conf;    }