Here is more info-
First i go to list screen where I display all employees foa department using-
Query query = currentSession.createQuery("from Employee v where v.deptId=" + deptId);
List<Employee> retList = query.list();
Next I go to particular employee by another query-
Query query = currentSession.createQuery("from Employee v where v.empId=" + empId);
Employee v = (Employee ) query.uniqueResult();
and once the user makes changes to the employee I call update-
Employee v = (Employee ) currentSession.merge(employee);
currentSession.flush();
and then I go back to view the list of employees again-
Query query = currentSession.createQuery("from Employee v where v.deptId=" + deptId);
List<Employee> retList = query.list();
I keep refreshing the list screen sometimes I see the employee with old details sometimes with new details.
I used a HibernateSessionFilter that starts up a session on each
servlet request and closes at the end of service the request.
let me know if you need any more details.. I am very confused why its behaving weird...Thanks for all your help!