Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-9053

JtaTransactionManager does not translate exceptions like JpaTransactionManager

    XMLWordPrintable

    Details

    • Last commented by a User:
      true

      Description

      The JpaTransactionManager seems to have a nice piece of functionality that translates an exception thrown by Hibernate.

      For example it will call translateExceptionIfPossible in doCommit and we will get a specific exception somewhere in the org.springframework.dao.DataAccessException hierarchy.
      For example org.hibernate.StaleStateException will get wrapped into a JpaOptimisticLockingFailureException.

      The JtaTransactionManger has no such call and seems to bundle all of my Hibernate exceptions into UnexpectedRollbackException exception.

      Not sure if this is a bug but it seems inconsistent and also we lose all of the specific exception type information.

        Attachments

          Activity

            People

            Assignee:
            juergen.hoeller Juergen Hoeller
            Reporter:
            crazytrain411 dodo bird
            Last updater:
            Spring Issues Spring Issues
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              3 years, 31 weeks, 3 days ago

                Time Tracking

                Estimated:
                Original Estimate - 2d
                2d
                Remaining:
                Remaining Estimate - 2d
                2d
                Logged:
                Time Spent - Not Specified
                Not Specified