hi, welcome.
Quote:
1. Is getHibernateTemplate().saveOrUpdate() call asynchronous?
no, changes immediately affect your model state in the session, but changes on database might be deferred until an invocation of flush(), and autoflush event, or commit of transaction.
Quote:
2. As per HibernateTemplate documentation, one can not handle checked exceptions in DAO layer. What does this mean? Where am I supposed to catch the exceptions thrown by getHibernateTemplate().saveOrUpdate() (Ex. DataIntegrityViolationException)?
sorry but both HibernateTemplate and DataIntegrityViolationException are not part of Hibernate code. I personally don't use them but rely on EntityManager, so can't tell.
Quote:
3. What are the best practices to handle hibernate exceptions?
propagate them up to the layer controlling transactions, at least, so that everything can be rolled back and state cleaned up (close the Session and get a new one).
Webapps usually propagate the error up to an error message to the user.
I'd suggest reading some books on the subject. there are some suggestions on the banners above.