Accessing thread local for http session

Can we follow the below approach for Spring MVC application ??

Accessing thread local for http session...Note: Each http session request will be bind to one thread...
Software ProgrammerAsked:
Who is Participating?
Duncan RoeSoftware DeveloperCommented:
You found how to declare them. After that, they work like regular externals, except they have a separate value in each thread. You know what code executes as a thread starts: initialise it there
Duncan RoeSoftware DeveloperCommented:
I guess you can. Why are you asking here instead of just trying it? You should be developing a unit test anyway
Software ProgrammerAuthor Commented:
Looking for a way to thread local variable which needs to be applicable for the particular thread..That is every request..

How to create a thread local variable and assign values for every request and use it anywhere in the application ?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.