Working on a transaction involving 7 different tables.
Before I throw code up since it will require some time...
One of the tables always has an attempt at an insert. This insert will fail sometimes due to a unique constraint error, but I don't care if it does, so I do this...
Code:
try {
insert( session, rel );
}
catch ( Exception e ) {
// if unique constraint error, ignore
// else throw Exception
}
the insert() method basically wraps session.save(). Nothing happens behind the scenes there.
So before I put the rest of the code, does the session or the transaction track exceptions and fail if there is at least one exception?
Currently, it fails inside the commit() method and I never even see the log entry created by ...
Code:
log.debug("commit");
Any ideas?