Hi,
here is the code for the servlet that iam hitting.
Code:
public void doPost(HttpServletRequest request,HttpServletResponse response)
throws IOException,ServletException{
try {
// Begin unit of work
HibernateUtil.getSessionFactory().getCurrentSession().beginTransaction();
PrintWriter out = response.getWriter();
HrmEmployeesList.listEmployees(out);
out.flush();
out.close();
//End unit of work
HibernateUtil.getSessionFactory().getCurrentSession().getTransaction().commit();
}catch (Exception ex) {
HibernateUtil.getSessionFactory().getCurrentSession().getTransaction().rollback();
throw new ServletException(ex);
}
finally {
HibernateUtil.getSessionFactory().getCurrentSession().close();
}
listEployees(out) is a java method which iterates & prints all the employees list.the result list was being created by the static block which i posted before is also in the same java class.
Hope u get understand.I want to know wheather tomcat is keeping its heap memory without releasing out?or else any tips to release tomcat memory