[Spread-users] spread exception

Daniel Rall dlr at collab.net
Fri Aug 2 16:56:47 EDT 2002

> > this happens after the application runs for a long time(8-10
> > hrs).how can we know when to reconnect and what is causing this
> > exception?
> > 
> > spread.SpreadException: Connection closed while reading header 
> > at spread.SpreadConnection.internal_receive(SpreadConnection.java:1045) 
> > at spread.SpreadConnection.receive(SpreadConnection.java:1018) 
> > at NewsHeadLines$NewsThread.run(NewsHeadLines.java:233) 
> Your client may be receiving messages too slowly. The daemon will
> eventually disconnect your client, I believe after buffering a certain
> number of messages (I believe it defaults to 1000).
> Do you happen to be using SpreadMessage's setObject() and/or
> getObject() methods? They both are implemented using Java's
> serialization mechanism, which is fairly slow.

jasniya badsha <jasniya at yahoo.com> writes:

>  Can u pls suggest a solution for this problem?I have just noticed
>  that this happens even after the applet runs for just an hour or
>  less.Can we know if the connection is actually being closed -the
>  applet gives unexpected results when i tried to reconnect
>  again(showing the same spread exception)

Are you then using the getObject()/setObject() methods of

If so, I'd recommend using a format other than Java objects for your
message payload.  There are quite a few tools which can turn simple
Java objects into XML (and vice versa).  The other getXxx()/setXxx()
methods of SpreadMessage won't have the overhead of Java

More information about the Spread-users mailing list