Servlet and Netty
Johnny Luong
johnny.luong at trustcommerce.com
Mon Jan 24 13:35:54 EST 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 01/23/2011 02:20 AM, Simplicity wrote:
> Hi everybody,
>
> Excuse my poor english, I am a French guy, so this is not my native language
> :)
>
> Congratulations for the netty framework, impressive product.
>
> Ok let's go. Here is my problem.
>
> I have tried the Telnet example. Works well. I've added Channel group. Works
> well.
>
> I work on a JSF 2.0 project, and I wanted to make "comet" like engine for
> learning.
>
> So I run my Telnet server, and when my web application is running, a jQuery
> ajax query is done to a servlet (to bypass cross-domain limitation). And the
> servlet contact the Telnet server. So everything work like a charm. Update
> is done in all my browsers when modifications are done in one.
>
> But there is a timeout in the ajax request and the servlet don't close my
> connexion to the Telnet server.
>
> Is there a way to detect that timeout in servlet, telnet server or in other
> part ? What do you think about that problem ?
>
> Regards,
>
> Fabrice.
Generally speaking, your client would have some sort of service thread
or process to clean itself up. Alternatively, you might implement your
own service thread or hook your cleanup onto the state of the socket on
the server end.
http://docs.jboss.org/netty/3.2/api/org/jboss/netty/handler/timeout/IdleStateHandler.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEUEARECAAYFAk09xooACgkQg7TIS7A9isffDACXfRPEBWX4W++lUe6O0WWq9UKh
1gCfRXaxPXRSMcx5tdkri8x7qhG3zFE=
=Qflo
-----END PGP SIGNATURE-----
More information about the netty-users
mailing list