Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] jetty 8 Continuation.getAttribute(name) is related to connection, not with the continuation!

The issue is that in a request/response lifecycle, the servlet spec allows objects like the request/response themselves to be reused for efficiency.   This includes the continuation instance, which is recycled for all request / response cycles on a connection.  

So you should not hold references to any objects from a request/response cycle past the completed notification event.


On 28 March 2013 02:59, Baldo Davide <baldosoft@xxxxxxxxx> wrote:
After few hours of debugging i found a strange behaviour in jetty,
setting a continuation attribute in a specific continuation which
originates from the same connection sets them all. I agree i shoudn't
store multiple "dead" continuation nonetheless this is NOT by any
means the excepted behaviour.

org.eclipse.jetty.continuation.Continuation.getAttribute(java.lang.String)
seems to be bugged:
  return _connection.getRequest().getAttribute(name);
may seems to work, but what if i store the continuation away and ask
for its object later on? it won't return the excepted object if i used
another continuation in the same connection because all "old"
continuations referes to the most recent connection request.

Let me know if you file this misbehaviour as a bug or not.

--
Regards,
Davide Baldo
_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev


Back to the top