Uploaded image for project: 'Spring.NET'
  1. Spring.NET
  2. SPRNET-1568

HibernateTransactionManager does not honor the transaction timeout

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0 M1
    • Fix Version/s: FUTURES
    • Component/s: Spring-NET-NH
    • Labels:
      None
    • Environment:
      Any

      Description

      The transaction timeout never kicks in when using the HibernateTransactionManager (and I suspect the same is true for HibernateTxScopeTransactionManager). This is a big problem in many cases where a client communication level timeout kicks in but the transaction completes after this without any possibility of returning the outcome to the client.

      I think that in DoCommit() there needs to be a timeout check possibly combined with a Session flush. Something like this:

      1. If transaction deadline is passed raise timeout exception
      2. If the session flush mode is auto or commit flush the session and once again check the transaction deadline.
      3. Commit the transaction.

      If this sound reasonable I could provide implementation/unit test and create a pull request.

        Attachments

          Activity

            People

            Assignee:
            sbohlen Steve Bohlen
            Reporter:
            yhrn Mattias Öhrn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: