dev@grizzly.java.net

Re: parameters in ServletContextImpl.

From: gustav trede <gustav.trede_at_gmail.com>
Date: Wed, 14 Jan 2009 00:39:19 +0100

2009/1/14 Jeanfrancois Arcand <Jeanfrancois.Arcand_at_sun.com>

> Salut,
>
> gustav trede wrote:
>
>> salut,
>>
>> ServletContextImpl.parameters is accessable in a non threadsafe way and
>> im sure unintended way from the public access methods in the ServletAdapter.
>>
>
> The instance is per thread and cached inside the Request object, so it
> doesn't need any synchronization :-)
>
servletcontextimpl must be concurrent. else it does not serve its purpose.


>
>
>
>> I think the correct way is to clone the map when its set on the
>> servletimpl ?.
>>
>> anyhow parameters and attributes in ServletContextImpl i will change to
>> concurrenthashmap, thats alot better then synchronized.
>>
>> im looking through alot of code to learn grizzly.
>> i create issues for each class i do changes too. i only do low risk
>> changes since i dont have a private branch.
>>
>
> You can easily create a branch yourself:
>
> svn copy trunk branches/gustavworks


thanks. will do so if i find some major tasks to do.


>
>
> A+
>
> -- jeanfrancois
>
>
>
>
>>
>> --
>> your servant
>> gustav trede
>>
>> coding is art - not only something that bring food on the table,
>> everybody should be able to feel proud about their code,
>> that they have performed their best considering the given conditions.
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>
>


-- 
your servant
 gustav trede
coding is art - not only something that  bring food on the table,
everybody should be able to feel proud about their code,
that they have performed their best considering the given conditions.