-
1. Re: Concurrent Threads in Seam components
keithnaas Mar 1, 2008 9:14 PM (in response to hiasi29)Is the NPE occuring on a reference to the user object?
Since its not really participating in Seam context, user is likely not available since injection doesn't occur.
For caching you might try the
PojoCache component.For asynchronous loading of the user data, see the section on 18.1.1. Asynchronous methods
You can even schedule it with @Duration, @Expiration and @IntervalDuration annotations for more flexibility.
Also not the following:
bq. The asynchronous method is processed in a completely new event context and does not have access to the session or conversation context state of the caller.
You could put the asynchronous method in an event scoped component and then inject it into your Session object.
There may be some examples of the cache and asynchronous in the seam examples.
Good luck!
-
2. Re: Concurrent Threads in Seam components
hiasi29 Mar 2, 2008 2:15 PM (in response to hiasi29)Hi Keith,
Thanks a lot for your response! @Asynchronous offers some additional cool features. I still have to think of a way to set my scopes in an appropriate way, but that's rather a design issue.
BR
Mat