Hi,
I have a scenario where I need to set some application specific context values on a thread and so I have a context provider class which will use a delegate(my "shiro delegate") for retrieving the values. Since I am using Shiro I wanted to take advantage of its handling of session values (clearing the thread at the end of the request for thread pool safety etc.) on a per HTTP request basis but the caveat is that the API secured by Shiro is stateless and I don't want to persist sessions between requests.. currently the chain uses a noSession filter. The general idea is that a request comes in, Shiro authenticates and the next (or previous) custom filter in the chain sets some values on the Subjects session (easy to use) which are later accessed by my context provider through the "shiro delegate". This session should only be valid for the duration of the request (it's a data holder for the thread) after which it ceases to exist.. the next API request would start over and do the same thing. I'd like to avoid having to implement my own ThreadLocal and the corresponding clearing after the request since Shiro already has this built in. Is this possible? Regards, Marcus.
