Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-4740

Clarify the interaction of events and database transactions

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Currently event handlers that interact with transactions and Hibernate entities might run into some issues:

      • the transaction might not be committed until all handling for the event is done
      • in some cases, the entire transaction might be rolled back, even after the event handler completed successfully
      • some events contain references to Hibernate entities, which is troublesome as events might be shared between threads, and these entities might be attached to a closed session

            [CWD-4740] Clarify the interaction of events and database transactions

            Events published during a database transaction are now delayed until that transaction commits. If the transaction rolls back, these are never published.

            Event handlers no longer contain Hibernate entities, nor share a session or transaction with the event publishers.

            Lukasz Pater added a comment - Events published during a database transaction are now delayed until that transaction commits. If the transaction rolls back, these are never published. Event handlers no longer contain Hibernate entities, nor share a session or transaction with the event publishers.

              lpater Lukasz Pater
              lpater Lukasz Pater
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: