Does anyone have a good tutorial or some advice on how to implement one’s own XAResource? I need Spring’s MailSender to be transactional, so that the mail will only be sent once the transaction commits, and it seems there isn’t any existing transactional wrapper.
Share
If you just need to wait for the commit, as you say in a comment, you can investigate using
TransactionSynchronizationManager.registerSynchronization()to trigger email sending on commit.