java - How to make session attribute threadsafe -


i have bean stored in session bean provides functionality. in order make functionality provided bean thread safe should develop bean in thread safe manner or session access bean should made thread safe?

if object thread-safe, can have 100 places in code access object, , thread-safe every time.

if object isn't thread-safe, you'll have make sure every 1 of 100 places access bean in common way guarantees thread-safety.

i'd make object thread-safe.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -