You may want to check the wiki[1] to see if it is there I am not sure.  I
will be the first to admin that our documentation is lacking in many ways.
 Especially on how to implement a container.  If you are interested in
contributing any documentation you can do this even if you are not a
committer [2].  Any contributions are welcome :)

[1] https://cwiki.apache.org/confluence/display/SHINDIG/Index
[2] http://shindig.apache.org/documentation_website.html


On Tue, Nov 13, 2012 at 7:59 AM, Martin Hoeller <mar...@xss.co.at> wrote:

> Thanks Ryan and Henry for your help.
>
> I actually just implemented what Ryan suggested and it works. For the
> records, here is what I did:
>
> 1) Implement my own class, derived from PropertiesModule:
>
> public class MyModule extends PropertiesModule
> {
>     public MyModule()
>     {
>         super("my-shindig.properties");
>     }
> }
>
> 2) Register the new class in web.xml instead of PropertiesModule:
>
>     <context-param>
>         <param-name>guice-modules</param-name>
>         <param-value>
>             ...
>             my.domain.MyModule
>         </param-value>
>     </context-param>
>
> 3) Provide my own copy of shindig.properties name my-shindig.properties
>
>
> - martin
>
> PS: This is another thing that should documented somewhere. Is there
>     some single source of information where we can add this?
>
> PPS: Once I'm a bit more familiar with shindig I'd like to update the
>      new maven archetype and add all the pieces I found out.
>
>
> Am Mon, 12 Nov 2012 20:38:56 -0500 schrieb Ryan Baxter
> <rbaxte...@apache.org>:
>
> > No that is not the recommended way to change shindig.properties.
> > What you should do is create a Guice module which does the same thing
> > as org.apache.shindig.common.PropertiesModule.  You can probably
> > extend PropertiesModule instead of implementing it all over again.
> > Then just install this module either by listing it in the web.xml of
> > your app or by installing it from another Guice module.
> >
> > -Ryan
> >
> >
> > On Mon, Nov 12, 2012 at 4:14 AM, Martin Hoeller <mar...@xss.co.at>
> > wrote:
> >
> > > 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
> > >
>
>
>
> --
> 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
>

Reply via email to