On Fri, Mar 13, 2009 at 7:07 PM, Rickard Öberg <[email protected]> wrote:

> Whaddya think? How would you do a stateful application layer?

I would probably go for a 'third' kind.
Use Services, but request a "SearchContext" from which you do the search();

@Service Search search;
...
SearchContext sc = search.context( .... );
sc.search(someString);

In that way, you can keep the proper separation between Service
configuration and Context persistence, as well as allow the context
parameters to be 'passed to' instead of 'inferred by' the Search
service (probably helps in testing).


Cheers
Niclas
-- 
http://www.qi4j.org - New Energy for Java

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to