Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » HttpConfiguration: change timeout by aQute fileinstall
HttpConfiguration: change timeout by aQute fileinstall [message #123914] Wed, 07 January 2009 22:05 Go to next message
Oliver Vesper is currently offline Oliver VesperFriend
Messages: 42
Registered: July 2009
Member
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
Re: HttpConfiguration: change timeout by aQute fileinstall [message #123957 is a reply to message #123914] Wed, 07 January 2009 23:46 Go to previous message
Neil Bartlett is currently offline Neil BartlettFriend
Messages: 93
Registered: July 2009
Member
Oliver,

The problem is really that FileInstall is a limited tool that can only
cope with String properties. If you have a ManagedService or
ManagedServiceFactory that requires non-String properties then you are
out of luck using FileInstall as your management agent.

You could build your own management agent, or enhance FileInstall. Note
that it is Apache V2 licensed, and I'm sure that Peter would accept back
useful patches. Of course the key question is how FileInstall is
supposed to know what type to convert each property to... you could
perhaps investigate using the Metatype service for this.

Regards,
Neil


Oliver Vesper wrote:
> 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
Previous Topic:How to add plugins manually (3.5M4)?
Next Topic:Updating installed JRE question
Goto Forum:
  


Current Time: Tue Mar 19 02:04:47 GMT 2024

Powered by FUDForum. Page generated in 0.01705 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top