File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Dynamic injection of properties based on a locale in Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Application Frameworks » Spring
Reply Bookmark "Dynamic injection of properties based on a locale in Spring" Watch "Dynamic injection of properties based on a locale in Spring" New topic
Author

Dynamic injection of properties based on a locale in Spring

Prabhakar Reddy Bokka
Ranch Hand

Joined: Jul 26, 2005
Posts: 174

Hi All,

We have an existing application in struts2 which uses ThreadLoal to set and get the information based on locale.
User will set the flag into ThreadLoal on his logon based on locale, and will retrive the properties file on need basis accross application. Now migrating this application to Spring we are facing an issue in getting the flag info from ThreadLocal.
Different threads are getting created by the container. One thread for login add flag into ThreadLocal, and few other threads for accessing the flag from different places of application. As specified in ThreadLocal the infomation set into ThreadLocal is specific to that thread, so we are getting null from all the other threads accessing flag (from ThreadLocal) from different places of the application.

Could any one suggest better approach for accessing properties file based on the info set while login?

SCJP 5, SCWCD 5
Prabhakar Reddy Bokka
Ranch Hand

Joined: Jul 26, 2005
Posts: 174

Friends!!

Any suggestions??

 
jQuery in Action, 2nd edition
 
subject: Dynamic injection of properties based on a locale in Spring
 
jQuery in Action, 2nd edition

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture