According to my understanding in hibernate (please confirm)
1- You have to session.close() if you get it by getSessionFactory().openSession()
session.close()
getSessionFactory().openSession()
I found I had to flush and then refresh the DAO, and then it worked.
session.flush() session.refresh(entityDAO)