Hi,
We have an application where there would be multiple modules each associated with a different schema.
Multiple modules may be participating in a transaction for data modification. Hence we require the transaction manager to be XA enabled.
There is an audit service which tracks the changes done in the model within the transaction and persists the audit data in one of the database schema.
I would require a hook to call the audit service before the transaction is committed on all the databases participating in the transaction.
Could somebody please let me know how this can be achieved in a clean manner? Currently I am thinking of extending the JtaTransactionManager provided by spring and call the audit service before calling the super.doCommit. Would this be right approach?
Would appreciate any pointers for this.
Thanks,
Shashi


Reply With Quote