[
https://issues.apache.org/jira/browse/FELIX-769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rob Walker closed FELIX-769.
----------------------------
Resolution: Fixed
Assignee: Rob Walker
Service property now set with actual HTTP and HTTPS ports used. Default service
property names are same as OSGi config properties for these values:
"org.osgi.service.http.port"
"org.osgi.service.http.port.secure"
These can be overridden with alternative service property names using the
following properties:
"org.apache.felix.http.svcprop.port"
"org.apache.felix.http.svcprop.port.secure"
e.g.
org.apache.felix.http.svcprop.port=http.port
org.apache.felix.http.svcprop.port.secure=https.port
> Publishing used ports in the HTTP Service
> -----------------------------------------
>
> Key: FELIX-769
> URL: https://issues.apache.org/jira/browse/FELIX-769
> Project: Felix
> Issue Type: Improvement
> Components: HTTP Service
> Reporter: Clement Escoffier
> Assignee: Rob Walker
>
> When we specify the port 0 in org.osgi.service.http.port or
> org.osgi.service.http.port.secure, the system gives an unused port
> automatically. This avoids socket binding issues (when a port is already used
> by another application). However, there is no way to get this port from the
> published HTTP service.
> This improvement is very simple. Just publish a service property with the
> HTTP service indicating the port. For example, the Equinox HTTP service
> publishes the 'http.port' property. This allows other bundles to get the port
> and is able to send an endpoint URL to a remote client.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.