A
Azo80
I am using Spring framework on Tomcat and I need to pass some values
from HTTPHeader (values are retrieved by filter) to my WebService
application. I could store this values in HTTPSession, but I cannot
find any method to reach HTTP Session from my Spring application.
I've just found other solution, using ThreadLocal. I can pass values
from my filter to Spring bean (which is a singleton) but I find it
difficult to make it safe (every value set by my filter in ThreadLocal
need to be "consumed" by my spring bean, because of ThreadPool and
possibility of reusing thread).
Is there any other approach to solve this kind of problem?
from HTTPHeader (values are retrieved by filter) to my WebService
application. I could store this values in HTTPSession, but I cannot
find any method to reach HTTP Session from my Spring application.
I've just found other solution, using ThreadLocal. I can pass values
from my filter to Spring bean (which is a singleton) but I find it
difficult to make it safe (every value set by my filter in ThreadLocal
need to be "consumed" by my spring bean, because of ThreadPool and
possibility of reusing thread).
Is there any other approach to solve this kind of problem?