-
1. Re: SessionScoped or ConversationScoped beans in Seam Cron Module
lightguard Jul 24, 2012 6:24 PM (in response to suikast42)No, as the error states, those contexts aren't available. Seam Cron effectively runs in the background and is not tied to a request, or even an HttpSession. You can't guarantee those scopes will be active.
-
2. Re: SessionScoped or ConversationScoped beans in Seam Cron Module
suikast42 Jul 25, 2012 2:34 AM (in response to lightguard)And whats about custom scopes ??
-
3. Re: SessionScoped or ConversationScoped beans in Seam Cron Module
lightguard Jul 25, 2012 10:39 AM (in response to suikast42)A custom scope should be okay, depending on when it's active.
-
4. Re: SessionScoped or ConversationScoped beans in Seam Cron Module
suikast42 Jul 26, 2012 2:57 AM (in response to lightguard)ThanksI'll try and an give a feedback
-
5. Re: SessionScoped or ConversationScoped beans in Seam Cron Module
tdtappe Aug 30, 2012 11:29 AM (in response to lightguard)And would it be possible to programmatically start a session/conversation when the cron job is triggered?
The problem is that all my business logic heavily depends on session/conversation/request scoped beans.
-
6. Re: SessionScoped or ConversationScoped beans in Seam Cron Module
lightguard Aug 30, 2012 3:01 PM (in response to tdtappe)No, probably not because they're bound to an HttpSession. In your case, I'd look at either creating your own scopes or seeing how you can break things up into to composite parts and build things up with injection, probably having the small bits be DependantScoped.
-
7. Re: SessionScoped or ConversationScoped beans in Seam Cron Module
tdtappe Aug 31, 2012 3:36 AM (in response to lightguard)Or is it somehow possible to fake an HttpSession?
As I am not very familiar with custom scopes how would I do such a thing? If I got you right I might introduce some new scopes like MySessionScoped, MyConversionScoped and MyRequestScoped.
These scopes have to be bound to standard SessionScoped, ConversationScoped and RequestScoped for normal (non-cron) usage. And in case of cron-usage I have to start/end these scopes on my own. How can these two things be done?