Hi:

I have Custom user handler that performs authorization and relevant processing 
on every Rest call by going to database and fetching User information such as 
roles, timezones, etc.

Almost all my resource calls would need access to that User information. Is 
there a thing such as a shared context for duration of one wink life-cycle call 
that I can cache this User object so that all other resources can have access 
to, thus eliminating the need to re-fetch the same User information when a 
resource method is called from the database.

Normally, in a web application, you have a filter that performs this 
cross-cutting concerns and then you cache the info in request scope for 
Servlets or Jsps to use for the duration of the request. 

I can put the user information in the HttpServletRequest as an attribute in my 
Handler but I do not know how to access HttpServletRequest in my resource 
methods or the attribute.
                                          

Reply via email to