chirag jain wrote:As I have described in my previous post, I have tried by closing entity manager, but not working...
transaction.start();
entitymanager = createEntityManager();
entityObj = entitymanager.find();
closeEntityManager(entitymanager );
entityObj.setField1(value);
transaction.commit();
I don't know how your closeEntityManager method works. But you can't commit a transaction to a closed entity manager. And, if you
are committing successfully, changes are persisted, as expected. Entity manager and transaction should be nested, the transaction within the entity manager.