Configuration config = metaSystemCollection.getConfig();
if (config.isDirty()) {
try {
Document d = config.getElement().getOwnerDocument();
systemCollection.getCollection(SystemCollection.CONFIGS).setDocument(METAKEY, d);
config.resetDirty();
} catch (Exception e) {
log.error("Error writing configuration '" + METAKEY + "', for database " + getName(), e);
}
}
}