users@grizzly.java.net

Re: CometEngine.register thread safety

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 07 Jul 2008 10:44:32 -0400

Salut,

I've filled:

https://grizzly.dev.java.net/issues/show_bug.cgi?id=188

to track the issue. I will start adding synchronized but if you have a
patch, just attach it to the bug.

Many thanks!

-- Jeanfrancois


Jeanfrancois Arcand wrote:
> Hi Dan,
>
> Dan Dubois wrote:
>> Hello All,
>>
>> I want to use CometEngine.register in my servlet doGet request.
>>
>> However looking at the source code v1_8_0_1
>> (https://grizzly.dev.java.net/source/browse/grizzly/tags/1_8_0_1/modules/comet/src/main/java/com/sun/grizzly/comet/CometEngine.java?rev=1268&view=markup
>> <https://grizzly.dev.java.net/source/browse/grizzly/tags/1_8_0_1/modules/comet/src/main/java/com/sun/grizzly/comet/CometEngine.java?rev=1268&view=markup>)
>> I believe that CometEngine.register is not thread safe. Do you agree
>> with this?
>
> Yes.
>
>>
>> The reason I bring this up is because I can see quite a few use cases
>> where one would want to register a CometContext in a multithreaded
>> environment, for example in a servlet event. Do you agree that it
>> might be good to either document the lack of thread safety of make is
>> threadsafe?
>
> I fully agree. Since you looked at it, can you point me to the other
> place? Or better, send me a svn diff :-) :-) :-)
>
>
>
>>
>> The main reason I am taking time to comment is because I think Grizzly
>> is excellent and want to help it get even better.
>
>
> Thanks!
>
>>
>> Best wishes,
>>
>> Dan
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>