Torsten Schlabach wrote:
lenya.roles contains service role descriptions. But usecases are resolved
using a selector:

  <role name="org.apache.lenya.cms.usecase.UsecaseSelector"
        shorthand="usecases"
        default-class="org.apache.cocoon.components.ExtendedComponentSelector"/>

which means they don't have specific roles but only hints for the
role "o.a.l.cms.usecase.UsecaseSelector". That's why they are declared in
cocoon.xconf as a configuration of the UsecaseSelector, not in
lenya.roles.


I see. This explains the difference in syntax that always confused me. Is
this documented anywhere on this planet?

Hmm, I'm not sure ... the most valuable sources about these issues are IMO the Avalon Wiki and the Excalibur site.


BTW, there was a discussion about changing usecases to POJOs recently,
which lead to the result that we could introduce a UsecaseBuilder which
sets up usecase POJOs according to the Avalon lifecycle, but I'm not
sure if this is easy to implement. (the reason for the discussion was
that usecases are not allowed to store data in fields at the moment).


POJO = plain old java object (just guessing)

Yes :)

(the reason for the discussion was
that usecases are not allowed to store data in fields at the moment).

What fields and what data?

The problem is that usecase objects must be destroyed before every sendPageAndWait() and rebuilt after the return to the flowscript. Meanwhile, the parameters are stored in a proxy object. That's why the usecase must store all its data in parameters, not in fields of the object. BTW, the name of the thread was

  [trunk] usecases: stateless services or objects ?

-- Andreas


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to