I'm working on migrating legacy code that was using the OpenJPA Transaction Listener to identify a transaction boundary (commit) to trigger some post-commit functionality. The logic is a bit messy, but the idea is that after a commit is completed, an MQ message must be published to trigger some asynchronous processing. It is critical that the MQ message only be published after the commit as the MQ Client only has access to the persisted data and must only be triggered one the commit is confirmed.
The legacy code is leveraging the OpenJPA `org.apache.openjpa.event.EndTransactionListener#afterCommit()` listener to trigger the message publishing.
Is there any similar constructs that I can use with JDO? The closest I have found are the JDO Lifecycle listeners, but those unfortunately provide triggers on the individual objects and not the transaction as a whole. I noticed that the DN TransactionImpl has listeners n(org.datanucleus.TransactionEventListener) that I could likely leverage, but that would then imply that I need to have dependencies on the Impl instead of just the JDO standard.
Am I overlooking anything?