-
1. Re: Is daemon-like process possible from app startup?
swd847 May 22, 2009 1:50 AM (in response to vk101)Create an application scoped component marked @Startup the either executes and @Asynchronous method or spawns a thread directly.
-
2. Re: Is daemon-like process possible from app startup?
vk101 May 22, 2009 7:02 AM (in response to vk101)Thanks, I'll give that a go! So if I have an application-scoped component that executes an @Asynchronous method of a ScopeType.STATELESS component (ComponentA), how can ComponentA make available something in a context to another component (ComponentB) that it calls.
For example, if ComponentB needs certain objects available in context variables, how can a STATELESS ComponentA, which calls ComponentB, set up the context variables correctly? I'm under the impression that if ComponentA STATELESS it can't outject something to any of the stateful contexts.
-
3. Re: Is daemon-like process possible from app startup?
vk101 May 22, 2009 8:36 PM (in response to vk101)Are @Asynchronous methods run asynchronously but not in parallel? If I've got a method scheduled to run every 30 seconds, and I set a breakpoint in my debugger, the next execution of the asynchronous method doesn't start until after the first execution of my method is over.
Shouldn't new threads be created every 30 seconds running the same method, meaning that if the method takes longer than 30 seconds to execute, multiple threads should be running the same method at one time?