Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-2454

tapestry-hibernate transaction management doesn't work as expected when commiting more than once on the same request

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.12
    • Fix Version/s: 5.0.14
    • Component/s: tapestry-hibernate
    • Labels:
      None
    • Environment:
      Mac OS 10.5.3, Jetty 5.1.14, MySQL 5.1, Hibernate 3.2.6GA

      Description

      Inside a request (and then on the same hibernate Session), after a first commit, the second transaction works "partially" (some operations won't persist).

      Apparently, this is because the method HibernateSessionManager.commit does a commit on the transaction it obtains from Session.beginTransaction (when first creating the Session) and then it calls begin() on the same Transaction, which apparently isn't the real underlying transaction on the database.

      If this is true, the solution could be get the underlying transaction again after committing either calling Session.getTransaction and Transaction.begin or just Session.beginTransaction.

        Activity

        Show
        hlship Howard M. Lewis Ship added a comment - See also http://forum.hibernate.org/viewtopic.php?p=2387715#2387715

          People

          • Assignee:
            hlship Howard M. Lewis Ship
            Reporter:
            raulmt Raul Montes
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development