getTransaction().commit() forces a commit, yes, but the problem with
that approach is that you can't do any DB operation after that.
Basically, if you do something like:
user.setName("A");
user.save();
JPA.em().getTransaction().commit()
.....
user.setName("B");
user.save();
Last save will give you: "TransactionRequiredException occured : no
transaction is in progress " error.
Basically, I want something like jdbc's auto commit, where every txn
is reflected back to the db, when needed.
Thanks.