utx.commit(); // commit the transaction
} catch (Exception ex) {
try {
utx.rollback(); // in case of an exception rollback the transaction
} catch (Exception re) {
throw new RollbackFailureException("An error occurred attempting to roll back the transaction.", re);
}
String msg = ex.getLocalizedMessage();
if (msg == null || msg.length() == 0) {
Integer id = fields.getId();
if (findFields(id) == null) {