[ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514988 ]
Adrian Crum commented on OFBIZ-1170: ------------------------------------ David, Thank you very much for your feedback! I debated at length doing this in two steps, but it's easier for me to test and debug less cluttered code, plus I probably won't have time in the future to do this in two steps. For those who are interested in evaluating this, the only real concern I have with it is rendering templates that are a part of the content management system. Other than fixing the caching bug, that is the only place where I changed the program logic. I'm going to contact the Freemarker community about making the Template class cloneable. I believe syncronizing a clone call will be faster than the syncronizing method used in this patch. If the Template class was cloneable, then we could keep a "master copy" of the Template instance in the cache, clone it, and then apply the user's settings to the clone. > FreeMarkerWorker class has a bug in its caching logic > ----------------------------------------------------- > > Key: OFBIZ-1170 > URL: https://issues.apache.org/jira/browse/OFBIZ-1170 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk, Release Branch 4.0 > Reporter: Adrian Crum > Priority: Minor > Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch, > FreeMarkerWorker.patch > > > The FreeMarkerWorker class creates an instance of the Template class, > initializes it with the current user's locale, then stores it in a cache. > Other users will see the template rendered in the first user's locale, > regardless of their locale setting. > This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. > Some elements in the screen are rendered in another locale, regardless of > your current locale setting. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.