Jetty request recycling

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Jetty request recycling

Silvio Bierman
Hello all,

Can someone sched some light on when and how Jetty recycles request
objects? Are the objects guaranteed to stay valid until for example a
doGet or doPost has returned? I seem to have some cases where request
information seems to change during execution of a doPost.

Thanks,

Silvio


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Jetty request recycling

Simone Bordet-2
Hi,

On Fri, Sep 21, 2012 at 3:41 PM, Silvio Bierman
<[hidden email]> wrote:
> Hello all,
>
> Can someone sched some light on when and how Jetty recycles request objects?
> Are the objects guaranteed to stay valid until for example a doGet or doPost
> has returned? I seem to have some cases where request information seems to
> change during execution of a doPost.

Requests are recycled per-connection, after the response is complete.
If you call request.startAsync() and return from doGet() or doPost(),
the request is kept alive until the request is completed (which may
happen a number of invocations to doGet() or doPost() later, depending
what your application does).

If you have a reproducible test case, file a bugzilla, and we'll look at it.

Simon
--
http://cometd.org
http://webtide.com
Developer advice, services and support
from the Jetty & CometD experts.
----
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless.   Victoria Livschitz

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Jetty request recycling

Jesse McConnell
Keep in mind that the servlet-api does not actually ensure that some
of the request information does not change after the startAsync
though, you should copy off any information about pathInfo and the
like before starting async operations.  Some of the information is
available in request attributes though, so take a look at the spec if
there is particular information you need

cheers,
jesse

--
jesse mcconnell
[hidden email]


On Fri, Sep 21, 2012 at 10:39 AM, Simone Bordet <[hidden email]> wrote:

> Hi,
>
> On Fri, Sep 21, 2012 at 3:41 PM, Silvio Bierman
> <[hidden email]> wrote:
>> Hello all,
>>
>> Can someone sched some light on when and how Jetty recycles request objects?
>> Are the objects guaranteed to stay valid until for example a doGet or doPost
>> has returned? I seem to have some cases where request information seems to
>> change during execution of a doPost.
>
> Requests are recycled per-connection, after the response is complete.
> If you call request.startAsync() and return from doGet() or doPost(),
> the request is kept alive until the request is completed (which may
> happen a number of invocations to doGet() or doPost() later, depending
> what your application does).
>
> If you have a reproducible test case, file a bugzilla, and we'll look at it.
>
> Simon
> --
> http://cometd.org
> http://webtide.com
> Developer advice, services and support
> from the Jetty & CometD experts.
> ----
> Finally, no matter how good the architecture and design are,
> to deliver bug-free software with optimal performance and reliability,
> the implementation technique must be flawless.   Victoria Livschitz
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email