On Jan 17, 2011, at 21:05 , Holger Hoffstätte wrote:

> I'm looking at the HTTP Service and was wondering if anyone can tell if or
> how I can let the implementation pick a free port for a service, instead
> of having to choose one myself? The reachable address would be
> communicated to the outside world by different means, but I don't want to
> specify the port up front. From reading the docs it doesn't seem to be
> possible.
> Would have been nice for ad-hoc services and such.

I'm pretty sure that's currently not possible.

You could try configuring it (through Configuration Admin) with port N, then 
register some servlet and see if you can actually reach that servlet (repeating 
those steps until you can) but that's not the most elegant solution.

The current configuration you can "see" by looking at the actual service 
properties, which are propagated from the configuration.

I think it would be nice to have a setting "port=random" or 
"port="pick-from-range(8000,9000)" or something similar, so why not supply a 
patch!

Greetings, Marcel


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to