You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Alexander Klimetschek (JIRA)" <ji...@apache.org> on 2010/07/14 17:26:49 UTC

[jira] Commented: (SLING-1596) Reduce coupling between RequestData and SlingHttpServletRequestImpl

    [ https://issues.apache.org/jira/browse/SLING-1596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888381#action_12888381 ] 

Alexander Klimetschek commented on SLING-1596:
----------------------------------------------

Makes sense, had that issue once as well. Storing the RequestData as a request attribute makes the code a lot simpler. I think you no longer need the unwrap() methods at all, since a wrapper can be expected to pass through getAttribute calls that don't match locally (and I guess the wrappers in Sling only pass that call through anyway).

> Reduce coupling between RequestData and SlingHttpServletRequestImpl
> -------------------------------------------------------------------
>
>                 Key: SLING-1596
>                 URL: https://issues.apache.org/jira/browse/SLING-1596
>             Project: Sling
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: Engine 2.0.6
>            Reporter: Bertrand Delacretaz
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>         Attachments: SLING-1596.patch
>
>
> As discussed in http://markmail.org/thread/ldayz27ehldyvzr4 the tight coupling between RequestData and SlingHttpServletRequestImpl makes it impossible to use request classes that just implement SlingHttpServletRequest.
> I need this for example for SLING-550, where servlets run outside of the container's request/response cycle.
> I'll attach a patch that reduces coupling by grabbing the RequestData from a request attribute instead of relying on the SlingHttpServletRequestImpl class to provide it. All tests including integration pass with this patch.

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