cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira>
Subject Re: cocoon and hibernate sessions
Date Thu, 01 Jul 2004 08:07:50 GMT
Stephan Coboos wrote:

> Upayavira wrote:
>>> <map:match pattern="foo.jxt">
>>>    <map:generate type="jxt" src="foo.jxt"/>
>>>    <map:act type="closeHibernateSession"/>
>>>    <map:serialize type="html"/>
>>> </map:match>
>> This will not work.
>> Actions are used when building a pipeline, not when processing it. So 
>> the action will take place before the view is processed, not after.
> Oh, what a pitty. It's a little bit consfusing me why action is 
> executed before processing the pipeline, but OK it is so. I think of 
> process switch within the pipline?

Actually, when understood, it makes complete sense.

So, to explain:

Any pipeline when built, goes generator->transformer...->serializer. And 
that is it. Anything else, such as matchers, selectors and actions, that 
influence the pipeline, are used when building the pipeline, not when 
using it. So imagine a process that goes:
1) Which generator? Which transformers? Which serialiser
2) Okay, I've worked out my pipeline, so: generator, go generate

And the generator then starts up, passing SAX events down the pipeline 
until the serialiser has consumed all resulting events and something has 
been returned to the user.

Thus, actions are used when _building_ pipelines, not when _executing_ them.

Hope that makes sense.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message