6 Replies Latest reply on May 16, 2009 9:25 PM by gonorrhea

    approaches to disabling tx commits (for testing, including in the real container)

    jeanluc
      I'm looking for ways to prevent transaction commits when doing testing (not only SeamTests in the embedded container, but also while the application is normally deployed in JBoss5 and subject to Selenium-driven tests). The purpose is, of course, to leave the database untouched.

      The same purpose in a Spring + Hibernate project was achieved by having a proxy object intercepting calls to begin/commit/rollback, by having the begin() create a savepoint, then each commit() diverted to subsequent savepoints and, lastly, a rollback to the first savepoint in the end. Thus all the calls to commit(), from the app's and container's point of views worked as normal.

      I am curious if there is a more "native" approach in Seam's world.

      Thanks,
      JL