On 3/2/07, Robert . <[EMAIL PROTECTED]> wrote:
> Well, I am converting an existing Tapestry application to Wicket (due to
> performance and stability problems).
> The architecture is done is such a way that it is necessary to render
> responses in a different thread than where the original request comes in.
>
> The web application has to deal with asynchronous communication with a
> server. I will give you an example.
> The browser sends a request that it wants to submit X.
> The web application receives this and put task A on the event queue that
> sends it to the server application.
> In the meantime task A waits.
> The server application then sends a request to the web application that it
> needs information about Y.
> The web application retrieves the current cycle and renders a response so
> the user can answer the question about Y.
> And it continues like that when finally task A gets its response from the
> server and renders in a request cycle other than
> the one causing the request.
>
> This architecture existed before any web application was developed for it.

I think your best bet is to take a close look at Wicket servlet and
see how it prepares and executes request.

Let the application object create the web request,set the application
thread local, get the session, create a custom response object (this
is where you probably want to capture your output, see for instance
BufferedWebResponse) and then let the session create a request cycle
(which is not meant for reuse mind you) using those request and
response objects. Execute the request cycle (cycle.request()) and then
do something with the response object that should now hold the render
result. And don't forget to cleanup.

Eelco

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to