cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grzegorz Kossakowski (JIRA)" <>
Subject [jira] Commented: (COCOON-1831) Passing parameters to sub calls
Date Fri, 28 Dec 2007 15:04:43 GMT


Grzegorz Kossakowski commented on COCOON-1831:

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

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

> Passing parameters to sub calls
> -------------------------------
>                 Key: COCOON-1831
>                 URL:
>             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.

View raw message