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
Use Seam's built in async support
Read about how to report a bug.
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
Have you found a solution to your multi threading issue using @Asynchronous?