Gernot Koller wrote:
Hi
In my application I use the following pipeline fragment:
<map:select type="header">
<map:parameter name="header-name" value="X-Cocoon-Portal" />
<map:when test="true">
<map:transform type="rsf_components">
<map:parameter name="components" value="portal" />
</map:transform>
<map:serialize type="xml" />
</map:when>
<map:otherwise>
<map:transform type="rsf_components" />
<map:serialize type="html" />
</map:otherwise>
</map:select>
what it should do is: when ever the http header X-Cocoon-Portal is set to
'true' it should invoke the "rsf_components" transformer with a special
parameter and serialize xml content.
If the header is not set it should invoke the transformer without the
parameter and serialize html.
This works as expected using Cocoon 2.1.2.
After migrating to cocoon 2.1.3 it stopped working and it seemed that always
the 'otherwise' path was executed regardeless of any header values.
After some painfull hours of "debugging" I could track it down to the these
two lines in the cocoon.xconf:
<!--..... Start configuration from 'eventcache' -->
<component class="org.apache.cocoon.caching.impl.EventAwareCacheImpl"
role="org.apache.cocoon.caching.Cache/EventAware"/>
<!--..... End configuration from 'eventcache' -->
<!--..... Start configuration from 'eventregistry' -->
<component class="org.apache.cocoon.caching.impl.DefaultEventRegistryImpl"
role="org.apache.cocoon.caching.EventRegistry"/>
<!--..... End configuration from 'eventregistry' -->
With these two lines in the cocoon.xconf the behaviour is wrong, without
them everythings seems to work be allright.
I do not have much of an idea what these two lines really do but it seems to
have something to do with caching.
Maybe the problem is that the request without headerparameter has been
cached and sending a request with the headerparameter still fetches the old
(wrong) result from the cache.
This is just me speculating, but it would explain what I'm experiencing.
Actually I have no problems leaving out these two lines in the cocoon.xconf
but I have no idea what consequences this might have. I definitly don't want
to disable caching totaly and the shown pipeline fragment is part of the
resource every single request of my application uses for rendering.
By the way if anybody has a better method of migrating the cocoon.xconf file
from one version to the next, than the poor heuristics that I use, please
enlighten me !!
Thanks for your input,
Gernot
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]