users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: request no properties, response has properties

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Mon, 19 Dec 2011 21:43:18 +0000

On 19/12/11 17:17, Sergey Beryozkin wrote:
> On 19/12/11 17:14, Marek Potociar wrote:
>>
>>
>> On 12/19/2011 04:23 PM, Bill Burke wrote:
>>> Actually, maybe a properites map should be shared between request,
>>> response, filter, and handler and each of these
>>> interfaces should have a getProperites() method. I know Servlet
>>> request has attributes which are used a lot when
>>> forwarding requests and the app wants to send information along with
>>> the forwarding. If JAX-RS ever has the ability to
>>> forward requests, then a properties map on Request might be needed too.
>>>
>>> http://java.net/jira/browse/JAX_RS_SPEC-150
>>>
>>
>> Ok, makes a lot of sense, let's add the method to the Request. We need
>> to javadoc the connection between these methods.
>> Also, just to make sure we are on the same page, we are talking about
>> one single property bag instance reused by all the
>> components as part of a single req/resp processing, aren't we?
>>
>> IOW: ctx.getProperties() == request.getProperties() ==
>> response.getProperties() (in the scope of a single request)
>
> That may be confusing, in some frameworks response.getProperties() won't
> match those of request.getProperties()
>

Actually, I see, it just '==' confused me a bit;
I'm assuming getProperties() will return a mutable map ? That will be
good...


> Cheers, Sergey
>
>>
>> Marek
>>
>>>
>>> On 12/19/11 10:14 AM, Bill Burke wrote:
>>>> I've noticed that Response has a getProperties() method, but Request
>>>> does not. Is there a reason either way?
>>>>
>>>> I'm not sure either Request or Response needs a getProperites() method
>>>> as one already exists on FilterContext and MessageBodyHandlerContext.
>>>>
>>>