This is a design based question.
I have a business case where a record gets created/updated on a particular table called SAMPLE_TABLE. But, unfortunately if I use a scheduler to read the records the possibility that I will be overdoing things(like reading the same existing record every time) is more because the table does not have a flag where I can check for a condition if the record is processed by the scheduler(and adding a flag to db table is not an option, neither tweaking of UI). So, I was thinking if Hibernate interceptor can solve the case. With the interceptor in place any CRUD operations on this sample_table can be screened and I can push the record into the queue(and later listen to the queue and process the message) for additional screening.
My question: Am I over seeing the usage of Interceptor here? Are Interceptors used for logging purpose only?
Aucun commentaire:
Enregistrer un commentaire