-
1. Re: back group threads without user interactions
germanescobar Dec 21, 2009 3:39 AM (in response to hztiger)Use Lifecycle.beginCall() at the start of each thread and Lifecycle.endCall() at the end. Then you can have access to the contexts.
Hope it helps!
-
2. Re: back group threads without user interactions
kapitanpetko Dec 21, 2009 7:22 AM (in response to hztiger)
German Escobar wrote on Dec 21, 2009 03:39:
Use Lifecycle.beginCall() at the start of each thread and Lifecycle.endCall() at the end. Then you can have access to the contexts.That would probably work, but you should consider using asynchronous methods instead of 'raw' threads. That gives you thread pooling and management for free. It is also integrated with Seam, so you get access to contexts (application and event only)..
-
3. Re: back group threads without user interactions
hztiger Dec 23, 2009 3:07 AM (in response to hztiger)Thanks for replying, MyThread must be Seam componet if using Lifecycle.beginCall(). But MyThread is dynamice created, and have many instance. I think this method does not work.
-
4. Re: back group threads without user interactions
hztiger Dec 23, 2009 3:56 AM (in response to hztiger)Thanks for replying. But MyThread is dynamice created, and have many instances. Can you give me any examples?
Backgroup thread is widely used. And many should be integrated into seam. Can some one give me any such example.
Nikolay Elenkov wrote on Dec 21, 2009 07:22:
German Escobar wrote on Dec 21, 2009 03:39:
Use Lifecycle.beginCall() at the start of each thread and Lifecycle.endCall() at the end. Then you can have access to the contexts.
That would probably work, but you should consider using asynchronous methods instead of 'raw' threads. That gives you thread pooling and management for free. It is also integrated with Seam, so you get access to contexts (application and event only)..Click HELP for text formatting instructions. Then edit this text and check the preview.
-
5. Re: back group threads without user interactions
kapitanpetko Dec 24, 2009 3:36 AM (in response to hztiger)
tiger zhao wrote on Dec 23, 2009 03:56:
Thanks for replying. But MyThread is dynamice created, and have many instances. Can you give me any examples?
Backgroup thread is widely used. And many should be integrated into seam. Can some one give me any such example.Read about it here: Asynchronicity
-
6. Re: back group threads without user interactions
hztiger Jan 4, 2010 3:15 AM (in response to hztiger)
Nikolay Elenkov wrote on Dec 24, 2009 03:36:
tiger zhao wrote on Dec 23, 2009 03:56:
Thanks for replying. But MyThread is dynamice created, and have many instances. Can you give me any examples?
Backgroup thread is widely used. And many should be integrated into seam. Can some one give me any such example.
Read about it here: AsynchronicityAs to a single thread, it works. But There are many same thread. I have not seen such examples before. Really need help!
-
7. Re: back group threads without user interactions
kapitanpetko Jan 4, 2010 3:20 AM (in response to hztiger)If you call an asynchronous method multiple times that will create multiple background threads.