Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 14718 invoked from network); 21 Oct 2008 08:58:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Oct 2008 08:58:35 -0000 Received: (qmail 61865 invoked by uid 500); 21 Oct 2008 08:58:38 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 61585 invoked by uid 500); 21 Oct 2008 08:58:37 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 61574 invoked by uid 99); 21 Oct 2008 08:58:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Oct 2008 01:58:37 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Oct 2008 08:57:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8EED8234C21E for ; Tue, 21 Oct 2008 01:57:44 -0700 (PDT) Message-ID: <1091789210.1224579464574.JavaMail.jira@brutus> Date: Tue, 21 Oct 2008 01:57:44 -0700 (PDT) From: "Rob Walker (JIRA)" To: dev@felix.apache.org Subject: [jira] Closed: (FELIX-769) Publishing used ports in the HTTP Service In-Reply-To: <821009627.1224060584314.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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.