-
1. Re: Quartz, Locale and Mail - FacesContext is null
kapitanpetko Dec 15, 2009 7:26 AM (in response to frankyb)Inside your async method, you don't have access to session and conversation scopes. It doesn't run inside the JSF lifecyle,
so no FacesContext either. What you can do is try to install your own Locale component and set it up to return the locale you read from the DB (Cf. org.jboss.seam.core.Locale. Then Seam's Messages component will use it and should load the right bundle.HTH
-
2. Re: Quartz, Locale and Mail - FacesContext is null
frankyb Dec 16, 2009 11:39 AM (in response to frankyb)Thanks a lot for your response. Since injection works fine inside the async method, I thought there would be a FacesContext, too ;-)
What exactly do you mean with
install your own Locale
?Do I have to create a Seam component with the name
locale
that inherits from org.jboss.seam.core.Locale?
Well, I will try this right now! -
3. Re: Quartz, Locale and Mail - FacesContext is null
kapitanpetko Dec 17, 2009 2:17 AM (in response to frankyb)
Frank Bitzer wrote on Dec 16, 2009 11:39:
What exactly do you mean withinstall your own Locale
?
Do I have to create a Seam component with the namelocale
that inherits from org.jboss.seam.core.Locale?
Well, I will try this right now!Yes. The name has to be
org.jboss.seam.core.locale
and you need to give it APPLICATION precedence. -
4. Re: Quartz, Locale and Mail - FacesContext is null
baddeley84 Jun 13, 2013 8:47 AM (in response to kapitanpetko)Sorry to dig up the dead, did you manage to get this working? I have the same problem (setting Locale for message bundles from a MDB with no FacesContext)....if so can you provide an example?? Thanks