-
15. Re: Starting up Asynchronous Method at startup
asavitsky Oct 17, 2007 11:55 AM (in response to damatrix)Correction - the contexts would be there, but they will be based on a MockFacesContext, thus being completely useless for email rendering...
-
16. Re: Starting up Asynchronous Method at startup
hstang Oct 17, 2007 12:04 PM (in response to damatrix)Interesting.....so you can't do something like in a @Startup class?
Contexts.getEventContext().set("person", person); -
17. Re: Starting up Asynchronous Method at startup
davidintx Oct 17, 2007 12:06 PM (in response to damatrix)ASavitsky,
Could you post the url to the jira issue? It sounds like something I'd like to vote for. -
18. Re: Starting up Asynchronous Method at startup
asavitsky Oct 17, 2007 12:23 PM (in response to damatrix)Sorry, I didn't keep the URL, and now I can't find it :( Maybe it was done after all? The last time I looked at this issue was in June-July, things might have changed since then...
-
19. Re: Starting up Asynchronous Method at startup
gbc1 Oct 18, 2007 3:51 AM (in response to damatrix)Just try to add...
Lifecycle.beginCall();
and then perform your code. This should init JSF und thus enables eMail Generation. (but not for sure :-)
Greetz GHad -
20. Re: Starting up Asynchronous Method at startup
pmuir Oct 18, 2007 7:59 AM (in response to damatrix)You can send emails async, but you are probably best off waiting for the application to be fully initialized before sending - therefore don't during initialisation, schedule it to be sent later (say 30s)
-
21. Re: Starting up Asynchronous Method at startup
damatrix Oct 22, 2007 6:32 PM (in response to damatrix)Yes i agree with you. However, the issue is how to let the scheduler call the asynchronous message 30 seconds after startup.
It will be neat if there was an event raised by Seam after an application is deployed and before the first page is loaded up. That way a scheduler can just observe that event and call the asynchronous mail method. At least then all scopes will be available to pass objects to for rendering. -
23. Re: Starting up Asynchronous Method at startup
damatrix Oct 23, 2007 7:38 AM (in response to damatrix)That is more like it. :-)
Thanks for making that public for all of us who have needed to do this for a while.