Hello, I had a similar problem ones, and chose to solve it by reading the rss 
from local filesystem. This made it much faster and cacheable. 

In the background I had a cronjob runnning to save the rss to local file system 
every 5 min (unless the feed is unavailable)


A cleaner way whould perhaps be looking into the HttpProxyGenerator, and 
instead of 

HttpConnection connection = new 
HttpConnection(this.method.getHostConfiguration());

use the connectionManagerImpl and create a connection with a timeout. That 
should work.

The result, you could store in cache. Then, next time a request is done for the 
rss, and the request succeeds, you reaplace the cached part, if you get a 
connectionTimeOut, you return the cached value. If you only want to look every 
5 min if the rss changed, to have better performance, you put the entire 
pipeline for the rss part in an expiring pipeline.

Hope everything is clear,

Regards Ard

-- 

Hippo
Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel  +31 (0)20 5224466
-------------------------------------------------------------
[EMAIL PROTECTED] / http://www.hippo.nl
-------------------------------------------------------------- 

> 
> hi cocoon users
> 
> is there a generator to get external documents with HTTP that has a 
> built-in timeout-handling?
>
> the default generator work fine like this:
> <map:generate src="http://host/path"/>
> but if the requested resource isn't available an error page 
> is coming up.
> 
> i'd like to get an atom-feed from blogger.com and everythings works 
> fine, but if my site can't reach blogger, it's broken.
> 
> i saw there is such a piece of functionality in 
> cocoon-portal-coplets, 
> but i didn't find anything in cocoon itself. the 
> wsproxy-generator seems 
> to miss a timeout too.
> 
> thanks and regards
> stefan
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to