Hi Henry!

Thanks for your reply. I missed the Guice annotations with the setters.

The reason why my modified shindig.properties wasn't working anyway
was, that I provided my own shindig.properties in addition to the one
coming packaged with shindig-common.jar. But it seems the pre-packaged
one has precedence. It's working as expected when I include only one
shindig.properties and modify it accordingly.

Is the recommended way of configuring shindig to unpack the JAR, adopt
config-files and repackage the JAR? Or is there some other way to
provide own config-files without modifying the Shindig JARs?

thx,
- martin


Am Fri, 9 Nov 2012 11:30:30 -0800 schrieb Henry Saputra
<henry.sapu...@gmail.com>:

> Once you modify the properties file you need to restart the Shindig
> server because the value is injected during Guice bootstrap flow:
> 
>   @Inject(optional = true)
>   public void
> setConnectionTimeoutMs(@Named("shindig.http.client.connection-timeout-ms")
> int connectionTimeoutMs) {
>     Preconditions.checkArgument(connectionTimeoutMs > 0,
> "connection-timeout-ms must be greater than 0");
> 
> FETCHER.getParams().setIntParameter(HttpConnectionParams.CONNECTION_TIMEOUT,
> connectionTimeoutMs);
>   }
> 
> 
> On Fri, Nov 9, 2012 at 5:54 AM, Martin Hoeller <mar...@xss.co.at>
> wrote:
> 
> > Hi!
> >
> > I have a gadget that uses proxied content. The server providing
> > this data is quite busy so the connection timeout of 5000ms is to
> > short for me. I always get
> >
> > org.apache.shindig.gadgets.http.BasicHttpFetcher - Read timed out -
> > 5.005ms.
> >
> > In shindig.properties I found this:
> >
> > ---8<-------------------------
> > # Configuration for the HttpFetcher
> > # Connection timeout, in milliseconds, for requests.
> > shindig.http.client.connection-timeout-ms=5000
> > ---8<-------------------------
> >
> > So I increased this value without success. Debuging showed, that the
> > constructor of BasicHttpFetcher that allows to pass in timeout
> > values is never called. Instead the Constructor with hardcoded
> > defaults is called.
> >
> > Am I missing something or is the property from above useless and the
> > connection timeout hardcoded?
> >
> > tia,
> > - martin
> >



-- 
Martin Höller                   | martin.hoel...@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-40
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

Attachment: signature.asc
Description: PGP signature

Reply via email to