Only 44 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

sessions, locale and threads?  RSS feed

 
Mohammad Norouzi
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I am working on a web application, in my application, some information may change depend on the current locale that specified by the users. so I need to check the locale each time I am going to send out those information from my API. in addition in my API I have no access to request and response so I need to create a class in which I retrieve the current locale.

my problem is the design of this process. currently I am using a ThreadLocal in order to store the current locale, but I dont know whether a session may include more than one thread or not? if each session cause only one thread the ThreadLocal will work fine.

do you have any idea or such experience?

thank you very much in advance
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!