[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.equinox] HttpConfiguration: change timeout by aQute fileinstall

Hi folks,

I'm using successfully the equinox implementation of the OSGI HttpService. Now I'd like to change the http timeout to a larger value than the default of 30 seconds. As I am already using aQute fileinstall (www.aqute.biz/Code/FileInstall), I tried to change the timeout with a configuration file of the name "org.eclipse.equinox.http.HttpFactory-default.cfg" - the content looks like this:
http.timeout = 600


As the timeout did not change I started debugging the updated(String, Dictionary)-method of the class HttpConfiguration (which is actually being called) and realized the problem: the given timeoutProperty must be of type int - but it is of type String and therefore a ConfigurationException is thrown. The fileinstall documentation states "Notice that this model only supports String properties"...

So my question is how to get this working? Would it be a good idea to check within the HttpConfiguration's updated-method if the timeoutProperty is of type String and try to parse/convert it to an Integer? Is there a different approach?

My current workaround is to look through the ManagedServices for the HttpConfiguration and call its updated-method with a Dictionary-parameter containing a timeoutProperty of type int. It works but causes compile-warnings (Discouraged access).

Thanks in advance!
Oliver