users@grizzly.java.net

Re: Glassfish & Comet: catching client abnormal disconnection

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Thu, 16 Apr 2009 12:48:20 -0400

Hi,

glassfish_at_javadesktop.org wrote:
> Hello there,
>
> We have a simple Comet application running on glassfish v2 (with Grizzly 1.0.20), implementing a turn-based game, over http.
>
> Amongst our main concerns, we must "catch" abnormal disconnections (player close its client, network failure, etc.) when they happen, in order to mark the player as "out".
>
> What would be the best strategy for that ? Is that even possible ?

Yes. CometHandler.onInterrupt() will gets invoked when the client
disconnect or when the network get closed. Make sure you run GlassFish with:

<jvm-options>-Dcom.sun.enterprise.server.ss.ASQuickStartup=false</jvm-options>

as without some I/O operations do not reach Grizzly (intercepted).

Thanks

-- Jeanfrancois



>
> Thanks for your help,
>
> Fabien
> [Message sent by forum member 'fabien_b' (fabien_b)]
>
> http://forums.java.net/jive/thread.jspa?messageID=342429
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>