Hello,
I am having a mental block. I want to create a simple list that
tracks the last 10 records the user visited. I am using Struts2 and I
have implemented an interceptor to capture the id of the object when
the user goes to show().
At this point, I am not sure how I want to, or the best way, to save
this list. I am sure that I want the list to persist across
sessions. My struggle is that I don't want to pollute my model with
web specific data structures, and I didn't want to pollute my pretty
REST controller with User Preference code.
Struts2 interceptors have to be thread safe, so I am worried about
persisting data to the database from there. If I synchronize those
calls I worry I will be causing myself performance trouble.
So........would you......
* Create a UserPreference object and then update the database with the
interceptor each time the "thing" is viewed? The interceptor would
only be run on this specific action method -- show().
* Something else?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]