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

  • Hibernate Interceptor and Transactions

    I've been using an Interceptor for Hibernate 2 and from the beforeTransactionCompletion callback I was calling code intercepted by the TransactionInterceptor.
    Everything worked fine and I could see all the changes from both transactions.

    Now I've switched to Hibernate 3 and It seems that is running well, but the changes made by the called code (the nested transaction) are not visible after the first transaction is commited.

    I'm using PROPAGATION_REQUIERED transactions.

    Any idea?

    Thanks

  • #2
    To solve the problem I've forced a flush on the Hibernate session explicitly.
    But tis was not necessary with the Hibernate 2 Transaction Interceptor. Why?

    Thanks

    Comment


    • #3
      The internals of HB have been changed quite a lot since 2.x version. Even now 3.1 adds new behavior in regards to auto-commits. You can take a debugger and step throw the sources or look directly at what HB does behind.
      You can check the Spring code also to make sure there aren't changes between support for HB 2 and HB3.

      Comment

      Working...
      X