if you do all your processing/work in the request thread yes.
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> | JavaEE Factory <https://javaeefactory-rmannibucau.rhcloud.com> 2016-05-10 12:07 GMT+02:00 Kirys <[email protected]>: > On 08/05/2016 20:04, Romain Manni-Bucau wrote: > >> If you use tomee 1 that's normal since it is a JavaEE 7 feature. TomEE 7 >> supports it. >> >> A filter is safe if you support asynchroron't use it. Asynchronism or >> banalized threads is the main issue you can encounter with a ThreadLocal. >> >> > I'm not sure if I've understood it. > BTW I'm experimenting with a lib (pac4j) and i want to cache certain info > into a sessionscoped cdi, so i've built a filter that intercept the cases > that produces a change of state and I update the session info accordingly. > For now it is only an experiment for studying the lib and use cases. > Is it a reasonable way? > Bye > K. > >
