-
Apr 15th, 2011, 01:44 AM
#1
Updating a 'searchResultsCount' field using aop
I want to have a field in my entity that keeps track of how many times the entity has appeared in search results.
I have decided to use an aop based solution where after the "search" controller method has returned I pass the collection of entities to an @AfterReturning method in an @Aspect annotated class. This method will then update all the entities.
Do you think this is ok? Will it be too hard on the database and slow things down too much? Or should I use something like spring batch? I don't know much about spring batch.
Thank you for your time.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules