[ 
https://issues.apache.org/jira/browse/COCOON-1831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554799
 ] 

Grzegorz Kossakowski commented on COCOON-1831:
----------------------------------------------

Let's suppose you have these three requests on the CallStack:
r3
r2
r1

Where r1 is the first one created and has no caller request associated with, r2 
has r1 as caller and r3 has r2 as caller. Then if you call getValus() method of 
r3 it will return list consisting of items obtained from r2.getValues() call 
merged with list of values of r3 itself. If there is a conflict r3 overrides, 
of course. You should notice, that thanks to the fact r2 has a r1 as caller r2 
will ask r1 for values and merge with its own. As you see we get essentially 
the same result as we would traverse whole callstack.

This approach is better for even more than just clean implementation. You may 
happen to don't want request parameters to be passed to the called servlet. 
Then it's damn easy to achieve, you just need to use modified version of 
BlockCallHttpServletRequest that will not care about caller. With your approach 
it is not possible.

I hope that it's clear now and we don't overlook anything so we can commit this 
very precious functionality.

> Passing parameters to sub calls
> -------------------------------
>
>                 Key: COCOON-1831
>                 URL: https://issues.apache.org/jira/browse/COCOON-1831
>             Project: Cocoon
>          Issue Type: New Feature
>          Components: - Servlet service framework
>            Reporter: Reinhard Poetz
>            Assignee: Reinhard Poetz
>         Attachments: cocoon-servlet-service-impl.patch, 
> cocoon-servlet-service-impl.patch
>
>
> When a servlet service request is created, parameters from the parent request 
> are ignored. This means that the sub request is performed as a fresh and 
> clean new call. This would avoid any possible side-effects, but is very 
> inconvenient in practice because you don't even know the request header 
> parameters from the original (external) request. Additionally you can only 
> pass information which is part of the returned stream, which is e.g. a  
> blocker to use the servlet protocol together with the control flow 
> implementations. Those make use of special request parameters to transport 
> the model ("bizdata") to the view layer. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to