/**
* flushConfig ensures that the Collection configuration has been
* properly flushed to disk after a modification.
*/
public void flushConfig() throws DBException {
Transaction tx = new Transaction();
try {
userStack.pushCurrentUser(magicUser);
Document d = config.getElement().getOwnerDocument();
Collection col = sysCol.getCollection(SystemCollection.CONFIGS);
DocumentTable dt = DTSMHelper.documentToTable(d, col.getSymbols());
col.setDocument(tx, COLKEY, dt);
}
catch ( Exception e ) {
tx.cancel();
System.err.println("Error Writing Configuration '" + name + "'");
}
finally {
userStack.popCurrentUser();
if ( tx.getStatus() == Transaction.ACTIVE )
tx.commit();
}
}