Weblogic 8.1, EJB Stateless Session Bean, for transaction marked required, I can only get objects to persist successfully if I do:
session.beginTransaction();
session.save(obj);
session.flush();
tx.commit();
My understanding, from reading several documentation, is that only flush is required and tx.commit() is NOT needed. Any ideas why it will only work if both flush/commit are used? When doing only flush OR commit alone, hibernate successfully creates object with new generated id, but nothing is saved to DB when done with transaction - and no errors are returned.
Thanks in advance for your help.
|