Menu

#16 Provide a callback mechanism for Transaction completion

Release 1.2.0
closed
5
2014-12-19
2009-11-29
No

App developers shall be able to register Transaction synchronization callbacks to get informed before and after a transaction is committed or rolled back.
A method beforeCompletion() shall be calles whenever a Transaction will be committed; a method afterCompletion() shall be called when a Transaction was committed or rolled back. A boolean argument shall be given to indicate if it was committed or rolled back.

The callback shall be attached to a Session by extending the Session interface for a addTransactionCallback() method. Maybe it makes sense to also be able to register general callbacks with the SeesionManager. This mechanism works for manual Transaction handling.

To think about: For container managed transactions with a resource adapter it would be necessary to register a Synchronization callback with the AppServer's TransactionManager. (See interface javax.transaction.Synchronization.) Is it possible to support with the above mentioned mechanism, in a manner which is transparent to the application developer?

Discussion

  • Carsten Erker

    Carsten Erker - 2011-02-17

    To do: Integration test

     
  • Carsten Erker

    Carsten Erker - 2011-06-13
    • priority: 7 --> 5
     
  • Carsten Erker

    Carsten Erker - 2014-12-19

    moved to github tracker

     
  • Carsten Erker

    Carsten Erker - 2014-12-19
    • status: open --> closed
    • Group: --> Release 1.2.0
     
MongoDB Logo MongoDB