|
From: Juergen H. <ju...@in...> - 2005-04-08 10:08:38
|
I've introduced a LocaleContext abstraction and LocaleContextHolder class in "org.springframework.context.i18n". DispatcherServlet automatically populates LocaleContextHolder's ThreadLocal (delegating to LocaleResolver), and MessageSourceAccessor automatically uses the current Locale from there (falling back to the system default Locale). The LocaleContext is essentially analogous to Acegi's SecurityContext. I guess it's better to keep such contexts separate, though, else it'll be unclear who choses the Context implementation to use etc. To express this, it might make sense to remove the generic Context interface from Acegi, only keeping a SecurityContext, held in a SecurityContextHolder. Thoughts? Juergen |