I searched the mailing list and I couldn’t find the reason for why the HibernateException was changed to a RuntimeException.  If a failure occurs while persisting an object, for example if the database becomes unavailable, it would seem that the client should be forced to handle the failure.  In other words, a RuntimeException is generally used for programming errors, while a checked exception is used when the client fulfilled their contract but an unexpected error occurs.

 

A persistence error seems to fall into the latter category.  Based on this, as I would expect, in JDBC, a SQLException is a checked exception.  How is the HibernateException different?

 

Thank you for the information.

 

Scott    

Reply via email to