Salut,
Jeffrey Kesselman wrote:
> Here is the version of my code I'm working with right now. I've
> included a readme with reproduction instructions.
>
> I really hope its something dumb I'm doing...
I've updated to 1.0.27 and I'm not able to reproduce the issue, e.g. I
don't see any exception in the log. Can you try with 1.0.27 and let me
know if you see the issue? I do see:
> 8080-2;|Check to send <<< |#]
>
> [#|2009-05-05T13:46:37.019-0400|INFO|sun-appserver9.1|com.rebelmonkey.monkeywrench.mweb.CometClientHandler|_ThreadID=19;_ThreadName=CometSelector;|++interrupt|#]
>
> [#|2009-05-05T13:46:37.139-0400|INFO|sun-appserver9.1|com.rebelmonkey.monkeywrench.mweb.CometClientHandler|_ThreadID=17;_ThreadName=httpWorkerThread-8080-0;|++initialize|#]
>
> [#|2009-05-05T13:46:37.139-0400|INFO|sun-appserver9.1|com.rebelmonkey.monkeywrench.mweb.CometClientHandler|_ThreadID=17;_ThreadName=httpWorkerThread-8080-0;|Check to send >>> |#]
>
> [#|2009-05-05T13:46:37.139-0400|INFO|sun-appserver9.1|com.rebelmonkey.monkeywrench.mweb.CometClientHandler|_ThreadID=17;_ThreadName=httpWorkerThread-8080-0;|Check to send <<< |#]
>
> [#|2009-05-05T13:47:07.139-0400|INFO|sun-appserver9.1|com.rebelmonkey.monkeywrench.mweb.CometClientHandler|_ThreadID=19;_ThreadName=CometSelector;|++interrupt|#]
>
> [#|2009-05-05T13:47:07.277-0400|INFO|sun-appserver9.1|com.rebelmonkey.monkeywrench.mweb.CometClientHandler|_ThreadID=17;_ThreadName=httpWorkerThread-8080-0;|++initialize|#]
>
> [#|2009-05-05T13:47:07.277-0400|INFO|sun-appserver9.1|com.rebelmonkey.monkeywrench.mweb.CometClientHandler|_ThreadID=17;_ThreadName=httpWorkerThread-8080-0;|Check to send >>> |#]
>
> [#|2009-05-05T13:47:07.277-0400|INFO|sun-appserver9.1|com.rebelmonkey.monkeywrench.mweb.CometClientHandler|_ThreadID=17;_ThreadName=httpWorkerThread-8080-0;|Check to send <<< |#]
But I'm getting a JS script error when I add a name
> sendMessage is not defined
> http://192.168.0.101:8080/MWEB/chattest.jsp/event/2y7%2FjoMJjaFCCu0nQItmrQ%3D%3D
> Line 2
Any idea?
Thanks
-- Jeanfrancois
>
> JK
>
> The attachment(s) "" has been removed from this email because it
> contained a type of attachment known to carry viruses and other harmful
> software. The attachment has been removed for your protection, as well
> as that of Sun's network.
> If you know the sender and were expecting the attachment, please contact
> the sender and have them re-send the file using the .zip format. If the
> sender is unknown or if the email looks unusual or is unexpected, please
> delete it now.
> Additional information: http://antivirus.central.sun.com/
>
>
>
> On May 4, 2009, at 1:25 PM, Jeanfrancois Arcand wrote:
>
>> Salut,
>>
>> can you share a test case? If you can't share it public, drop me an
>> email at jfarcand_at_apache.org
>>
>> Thanks!
>>
>> -- Jeanfrancois
>>
>> Jeffrey Kesselman wrote:
>>> Unfortunately, it didn't help :/
>>> Still the same behavior. I do the two notifies one right after the
>>> other and the second one is dropped silently.
>>> I put a 500ms sleep ebwteen the two and it works.
>>> Both states are 100% reproducible.
>>> JK
>>> On May 4, 2009, at 12:44 PM, Jeffrey Kesselman wrote:
>>>>
>>>> Hi JeanFrancois
>>>>
>>>> Thanks for the quick answer. I have my onEvent synchronized
>>>> already. (Tried that first thing to make sure it
>>>> wasn't MY race somehow :) )
>>>>
>>>> I'll try CometContext.setBlockingNotification(true)
>>>>
>>>> Thanks
>>>>
>>>> JK
>>>>
>>>>
>>>>> Salut,
>>>>>
>>>>> Jeffrey Kesselman wrote:
>>>>> > Hey Guys,
>>>>> > > I've run into what seems to be a clear race condition. I have
>>>>> two calls > to notify in a row in my code. (One is a READ type
>>>>> the other is a > Notify type).
>>>>> > When they occur immediately right after each other, the second
>>>>> packet is > silently dropped. if i put a 500 ms sleep between
>>>>> them, they work fine.
>>>>> > > is this a known race condition? Are there known work arounds
>>>>> other then > the evil sleep?
>>>>>
>>>>> If you synchronize your onEvent method, does it help? Another
>>>>> workaround is to call
>>>>> CometContext.setBlockingNotification(true)....but I would try first
>>>>> with sync to see if that help.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> -- Jeanfrancois
>>>>>
>>>>>
>>>>
>>>>
>>>>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net