Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
29. Jul 2008, 22:31 CET | Link

We have a Seam component which contains and another Seam component (using @In (required=true) ). We decided to break apart the activities in one of the methods in the first component into four concurrent threads to improve performance using the Callable/Future/ExecutorService framework of Java 1.5.

We noticed that the "inner" Seam component was not always being created by Seam and therefore, we were getting null pointer errors (the code assumes that Seam creates all @In components). We've been told that each thread causes a new Seam context to be created and therefore we would not be able to simply create a new Callables and calling get() on their associated Future objects.

Has anyone come across this problem of making a Seam component multi-threaded and are there any recommendations or examples on how to implement Callable(s) on a Seam component?

Thank you,
  James

3 Replies:
29. Jul 2008, 22:42 CET | Link

Use Seam's built in async support

 

Read about how to report a bug.

30. Jul 2008, 13:21 CET | Link

I've been reading up on the @Asynchronous and Quartz but I haven't come across any examples where I could start two (or more) threads and wait for them to finish and then receive their results (like I can using the Callable/Future/ExecutorService framework.

Do you know of an example or could you supply one --- or just give me some pointers in that direction?

Thank you, James

11. Nov 2008, 07:27 CET | Link

Have you found a solution to your multi threading issue using @Asynchronous?