java - Audit using Spring hibernate mongodb -



java - Audit using Spring hibernate mongodb -

i looking design approach. want accomplish 'old new' changes when entity updated,during changes recorded/audited entity. trick former update entiry happens in mysql using hibernate , later entity lives in mongo using morphia. both these provider within spring mvc, independently yet together. dont bother each other coz crud happens independently respective changes. lastly time, tried bring together mongo , mysql using hibernate realized not possible ! (not sure there solution ), have take audit changes mongo , track them there every alter in jpa/hibernate managed entities.

i don't need regular audit version etc., or additional table. each entity. every alter in entity needs trailed 1 entity in mongo. mongo entity/document generic audit log. envers not suitable hibernate interceptor, fine how talk mongo, need ogm hibernate listeners ? spring aop spring aop + ? + ? will spring info can help ?

i have read , come idea, needs experts help me refine or suggest improve solution.

i planning implement spring aop , intercept @ service level, having audit service set audit bean in order not loose changes in utilize mechanism , set or flush audit alter dedicated document in mongo.

not sure above approach meaningful , achievable. help appreciated.

audit4j supports various options spring aop back upwards have write own mongodb plugin audit4j it's not available.

java spring hibernate mongodb jpa

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

Set Up Of Common Name Of SSL Certificate To Protect Plesk Panel -