Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-805

Extend BaseSessionContext.getRollbackOnly to cover transactions which have been asynchronously rolled back

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • AS 4.2.0 GA
    • EJB 3.0 RC9 - FD
    • None
    • None

      The current implementation of BaseSessionContext.getRollbackOnly will return true if the current transaction context has status Status.STATUS_MARKED_ROLLBACK.

      If using JBossTS, a transaction timeout results in the transaction being rolled back asynchronously (not just marked for rollback). Code using the getRollbackOnly method as an indicator of the current transaction status will not function as expected.

      The transaction status undergoes the following transition
      Status.STATUS_ACTIVE -> Status.STATUS_ROLLING_BACK -> Status.STATUS_ROLLEDBACK.

      Extending getRollbackOnly to check for Status.STATUS_MARKED_ROLLBACK, Status.STATUS_ROLLING_BACK and Status.STATUS_ROLLEDBACK will allow this code to function as expected.

            dandread1@redhat.com Dimitrios Andreadis
            kconner@redhat.com Kevin Conner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: