gwt Comet Heartbeat

308 views
Skip to first unread message

Noor

unread,
Nov 28, 2010, 2:39:34 AM11/28/10
to gwt-comet
Hi, I just want to know what is a heartbeat in gwt comet. Is is that
the client asynchronously send a call to the server??

Richard Zschech

unread,
Nov 28, 2010, 5:43:48 AM11/28/10
to gwt-comet
Hi Noor,

The heartbeats are sent from the server to the client to keep the TCP
connection alive. The server sends out the heartbeats if no data has
been sent for a certain amount of time. The client checks that
heartbeats are received and generates a connection error when they are
not received.

This is all handled transparently by the gwt-comet library. You are
safe to ignore the onHeartbeat() callback. You might want to use it to
make a connection status light on your GUI blink or something flashy :-
P

From Richard.

Noor

unread,
Nov 28, 2010, 8:32:47 AM11/28/10
to gwt-comet

I think that's the problem I am getting,I am using the jetty that
comes on gwt plugin in eclipse

Does someone know anything about this??
[WARN] Error sending heartbeat
org.mortbay.jetty.EofException
at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:760)
at org.mortbay.jetty.AbstractGenerator
$Output.flush(AbstractGenerator.java:566)
at org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:
911)
at
net.zschech.gwt.comet.server.deflate.DeflaterOutputStream.flush(DeflaterOutputStream.java:
100)
at
net.zschech.gwt.comet.server.impl.CountOutputStream.flush(CountOutputStream.java:
64)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:278)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
at
net.zschech.gwt.comet.server.impl.CometServletResponseImpl.flush(CometServletResponseImpl.java:
374)
at
net.zschech.gwt.comet.server.impl.CometServletResponseImpl.heartbeat(CometServletResponseImpl.java:
353)
at
net.zschech.gwt.comet.server.impl.ManagedStreamCometServletResponseImpl.heartbeat(ManagedStreamCometServletResponseImpl.java:
98)
at
net.zschech.gwt.comet.server.impl.BlockingAsyncServlet.suspend(BlockingAsyncServlet.java:
51)
at
net.zschech.gwt.comet.server.impl.CometServletResponseImpl.suspend(CometServletResponseImpl.java:
277)
at
net.zschech.gwt.comet.server.CometServlet.doCometImpl(CometServlet.java:
157)
at net.zschech.gwt.comet.server.CometServlet.doGet(CometServlet.java:
108)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
362)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at
org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:
49)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
505)
at org.mortbay.jetty.HttpConnection
$RequestHandler.headerComplete(HttpConnection.java:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
395)
at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:488)
Caused by: java.io.IOException: An established connection was aborted
by the software in your host machine
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:33)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:72)
at sun.nio.ch.IOUtil.write(IOUtil.java:28)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:334)
at org.mortbay.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:160)
at
org.mortbay.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:
207)
at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:693)


Noor

unread,
Nov 29, 2010, 7:35:59 AM11/29/10
to gwt-comet

Problem Solved,
Thanks

shama...@gmail.com

unread,
May 20, 2011, 5:37:32 PM5/20/11
to gwt-...@googlegroups.com
What the solution was?

shama...@gmail.com

unread,
May 20, 2011, 5:42:01 PM5/20/11
to gwt-...@googlegroups.com
...ah, forgot dev-mode part for URL, thanks

lorenzo belli

unread,
Jun 19, 2011, 12:16:45 PM6/19/11
to gwt-comet
Could someone please explain how to avoid this error?
I'm getting it all the time.

shama...@gmail.com

unread,
Jun 25, 2011, 4:21:25 PM6/25/11
to gwt-...@googlegroups.com
Seems it happens time to time. The solution I have written before not helped in my case to be truth. See my post in this group and this issue: http://code.google.com/p/gwt-comet/issues/detail?id=20

Emil Daoura

unread,
Sep 27, 2012, 6:11:07 AM9/27/12
to gwt-...@googlegroups.com, bake...@gmail.com
How did you solved it?

On Monday, November 29, 2010 1:35:59 PM UTC+1, Noor wrote:

Problem Solved,
Thanks

kapil...@gmail.com

unread,
Jun 29, 2014, 4:33:25 AM6/29/14
to gwt-...@googlegroups.com, bake...@gmail.com
Hi Noor,

Can you please let us know how did you solved the issue.
Reply all
Reply to author
Forward
0 new messages