Reputation: 531
I am writing to ask for advice. I have to monitor certain "insert" on a mysql db. In what way is more convenient to do this? The application uses Servlets and MySQL. Thank you very much
Upvotes: 1
Views: 485
Reputation: 1109735
Depends on the persistence framework you're using.
Interceptor
and hook on onSave()
.@PrePersist
or @PostPersist
annotation.This is unrelated to servlets. The servlet is just an API for intercepting on HTTP requests. Your data access layer should be independent and transparent from that.
Upvotes: 2