Announcement Announcement Module
Collapse
No announcement yet.
Hibernate checked Exceptions Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hibernate checked Exceptions

    I was trying to use the HibernateTemplate's method createCriteria and found that there's no wrapping for Hibernate's checked exception HibernateException in this method.
    Why isn't the exception being converted to a Spring's unchecked exception?

  • #2
    Simply because HibernateException is never thrown in this method body.

    Comment


    • #3
      If not, why is it declared in the method's signature?

      Comment


      • #4
        Actually, as the JavaDoc states, you are really expected to use this inside a HibernateCallback (as you get when using the execute method). The execute method will do the exception translating for you.

        Comment

        Working...
        X