max wrote:
and that you java vm runs out of memory means you should get more memory in your java vm....(or check if you have a memory leak ,)
Thks max. I will change my code to following:
Code:
Session session=null;
Transaction tx=null;
try{
session=HibernateUtil.currentSession();
tx=session.beginTransaction();
..................................
.............................
tx.commit();
}catch(Throwable e){
try{
tx.rollback();
}catch(Exception e){
e.printStackTrace();
}
}finally{
try{
HibernateUtil.closeSession();
}catch(Exception e){
e.printStackTrace();
}
}
But the hibernate's docs all catch HibernateException only. For example,HibernateUtil helper class. Why hibernate's example all catch HibernateException instead of Throwable ?
I will try catch Throwable instead of Exception in the next Application test.
Our hibernate web application is accessed by 20 clients.
Quote:
get more memory in your java vm
What java vm paremeter should I set , I don't know whether 256 is enough. Expecting your suggestion. :)