users@grizzly.java.net

Re: Dead Simple Comet example

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Fri, 02 May 2008 10:06:23 -0400

Jim Driscoll wrote:
> Jeanfrancois Arcand wrote:
>> Jim Driscoll wrote:
>> But if I put the hidden.location call into the POST function
>>> on the client, would that still work? (It works, I tested it, but
>>> I'm wondering if leaving all those dangling Handlers out there will
>>> eventually mess things up.)
>>
>> By Handlers, you means CometHandler?
>
> Yes, I'm thinking of the problem that Arun had, where he had a
> multiplying number of Handlers. If the connection is broken, do the
> Handlers associated with that connection get deactivated and eventually
> garbage collected, or do they hang around. At what point do the
> Handlers become deactivated?

Yes. When the client disconnect, the CometHandler.onInterrupt() will be
invoked and then the CometHandler removed and make ready for gc.

BTW nice blog. You made the front: http://java.net

-- Jeanfrancois


>
> Jim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>