cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <>
Subject RE: AW: [c2] timeout parameter to FileGenerator
Date Wed, 16 May 2001 23:20:47 GMT
On Wed, 16 May 2001, Vadim Gritsenko wrote:

> If you are using sockets, the most simple and effective solution would be
> socket.setSoTimeout() to timeout value.
> In this case, you do not need any extra threads and complicated
> synchronization mechanism.
> Is it possible to do this way?

well, no, i don't think so. we use the URLConnection class to get the last
modified date of the resource, which doesn't offer any timeout parameters.
the actual resource fetching and parsing is done by the sax parser, which
doesn't offer any timeout settings for fetching external resources either.
we could get the resource's headers and byte array manually and construct
the inputsource on that byte array, but the resource could still have
external entities which would need to be resolved and retrieved, which
could take longer than the timeout should allow. also, setSoTimeout just
sets the amount of time the socket is allowed to be idle, not the amount
of time it takes to download the entire resource.

- donald

To unsubscribe, e-mail:
For additional commands, email:

View raw message