In this code snippnet,
try {
Session session = new Configuration().configure().buildSessionFactory ().openSession();
session.beginTransaction();
Criteria crit = session.createCriteria(..);
List l = crit.list();
session.getTransaction().commit();
} catch(HibernateException e) {
..
}
Is it OK if I only catch the "HibernateException" ? Do I have to catch a "Exception" also ? I really don't see any other possible Exception besides "HibernateException" .. Please advise.
try {
Session session = new Configuration().configure().buildSessionFactory ().openSession();
session.beginTransaction();
Criteria crit = session.createCriteria(..);
List l = crit.list();
session.getTransaction().commit();
} catch(HibernateException e) {
..
}
Is it OK if I only catch the "HibernateException" ? Do I have to catch a "Exception" also ? I really don't see any other possible Exception besides "HibernateException" .. Please advise.