Currently I am working on an application which is kind of batch utility in nature. This batch utility is database intensive and we use Hibernate ORM framework for the same.
We need to envision all possible faults this application may encounter and need to provide appropriate exception/error handling for the same and convey such messages back to the calling application.
I would want to know typically how is a Database timeout exception trapped and handled using Hibernate. Say if the batch utility has run into some error (not business exceptions) but fatal error like insufficient memory can such a error/exception be trapped and the message can be conveyed back to the calling application. Or say handling and communicating such fatal errors in a generic fashion "System not available" types.