Can I make a particular transaction disable auditing using ENVERS?

匆匆过客 提交于 2019-12-10 23:09:03

问题


I am using hibernate in Spring.I also use ENVERS for auditing.

I need to disable auditing for one particular transaction. Does ENVERS support this?


回答1:


Yes, but it's certainly not very straight-forward.

What you need to do is to implement conditional auditing, see documentation for details. The gist is that you'll need to present your own various Envers listener implementations which would fire and need to check some value you've set as a part of the transaction to veto the audit listener's actions.

I do have a proposal for enhancing the conditional auditing process, HHH-11326. Feel free to comment there with any additional thoughts you have on the feature.



来源:https://stackoverflow.com/questions/33430885/can-i-make-a-particular-transaction-disable-auditing-using-envers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!