Thanks for pointing me in the right direction, this solution will suffice. After doing more reasearch, it seems better to implement the MessageSourceAware interface instead of ApplicationContextAware interface. This way you're tied down to only using messageSource methods.
Solomon Duskis wrote: > > The ApplicationContext is a MessageResource. You can get access to the > ApplicationContext via implementing ApplicationContextAware > > I assume that you have access to the request, so that you can do: > RequestContextUtils.getLocale(request). > > You can then call: applicationContext.getMessage(..., locale) > > -Solomon Duskis > > > On 10/24/07, Zakir <[EMAIL PROTECTED]> wrote: >> >> >> I am having difficulty accessing the resource bundle from the service >> layer. >> Basically, I have a web service (using xfire) that takes in a message key >> and a language key. I need to get the message from the resource bundle >> with >> that key, populate some values, and return it. I've seen in >> BaseFormController you use getMessageSourceAccessor().getMessage(msgKey, >> locale); From my understanding, this is provided by Spring to the >> SimpleFormController. Is there any way I can do something similar on the >> service layer? >> >> Thanks. >> -- >> View this message in context: >> http://www.nabble.com/Accessing-Resource-Bundle-from-Service-Layer-tf4684064s2369.html#a13384781 >> Sent from the AppFuse - User mailing list archive at Nabble.com. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- View this message in context: http://www.nabble.com/Accessing-Resource-Bundle-from-Service-Layer-tf4684064s2369.html#a13392539 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
