* @param o Object to be saved
*/
void saveObject(DBTransaction trx, Object o) {
Session hibernateSession = this.getSession();
if (trx.isRolledBack() || trx.isCommitted()) { // some program bug
throw new DBRuntimeException("cannot save in a transaction that is rolledback or committed: " + o);
}
try {
hibernateSession.save(o);
if (Tracing.isDebugEnabled(DBManager.class)) {
Tracing.logDebug("save (trans "+trx.hashCode()+") class "+o.getClass().getName()+" = "+o.toString(),DBManager.class);
}
} catch (HibernateException e) { // we have some error
trx.setErrorAndRollback(e);
throw new DBRuntimeException("Save failed in transaction. object: " + o, e);
}
}