You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Johan Compagner (JIRA)" <ji...@apache.org> on 2007/03/09 23:37:09 UTC

[jira] Commented: (WICKET-366) Set Request Cycle in ThreadLocal

    [ https://issues.apache.org/jira/browse/WICKET-366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479744 ] 

Johan Compagner commented on WICKET-366:
----------------------------------------

But what will you do with a RequestCycle,
are you just really writing and reading from the request/response objects from another thread?
Is that even legal in the servlet world?

> Set Request Cycle in ThreadLocal
> --------------------------------
>
>                 Key: WICKET-366
>                 URL: https://issues.apache.org/jira/browse/WICKET-366
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.3, 2.0
>            Reporter: Robert
>            Priority: Minor
>             Fix For: 1.3, 2.0
>
>
> I want to request a static set method on RequestCycle to set the cycle in the current ThreadLocal, so that Wicket can create components and such in a different thread than where the HTTP request entered.
> Without this a WicketRuntimeException("Can not set the attribute. No RequestCycle available") is thrown from the Session.setAttribute method.
> Suggested implementation:
>     public static void set(RequestCycle cycle)
>     {
>         current.set(cycle);
>     }
> This is similar to the static set methods for Session and Application.
> This method can also be protected if desired.

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