How to record all the changes made in a transaction?


We would like  to do data trail with DN.  That is , for every transaction, we want to record all the changes made in the transaction and log them in log file.  We find that DN has interface org.datanucleus.TransactionEventListener to listen to transaction event. But how can we register the listener to a transaction and how to get all changes in the transaction? Thanks for any answering.


TransactionEventListener allows you to know when a transaction begins/commits etc. This is a DN properietary extension to JDO, registered using
What has changed is a different question, which you can catch using standard JDO lifecycle listeners / callbacks.