[ 
https://issues.apache.org/jira/browse/FELIX-4473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13955717#comment-13955717
 ] 

Felix Meschberger commented on FELIX-4473:
------------------------------------------

bq. there's an unused variable ({{connectors}})

That is a transient variable which turns out to not be needed. Would remove 
before committing. Thanks for spotting.

bq. the default HTTP and/or HTTPS connectors are installed by default

Actually plain HTTP is enabled by default while HTTPS is disabled by default. 
Even if you configure HTTPS it is only enabled if the 
{{org.apache.felix.https.enable}} is set to true (or yes) and the HTTPS port is 
defined (which it is by default).

So I think we are probably fine since, also if you configure the embedded HTTPS 
connector you still have to explicitly disable the plain HTTP connector if you 
don't want it.

One additional thing, though: Currently the Jetty server is stopped (aka not 
started) if neither HTTP nor HTTPS connector are (or can be) started. With the 
{{ConnectorFactory}} we should keep the Jetty server running since a 
{{ConnectorFactory}} service can come at any time. Alternatively starting the 
Jetty server could be delayed until a {{ConnectorFactory}} service becomes 
available (or default HTTP or HTTPS are configured).

> [Jetty] Add support for Jetty Connector injection
> -------------------------------------------------
>
>                 Key: FELIX-4473
>                 URL: https://issues.apache.org/jira/browse/FELIX-4473
>             Project: Felix
>          Issue Type: Task
>          Components: HTTP Service
>    Affects Versions: http-2.2.2
>            Reporter: Felix Meschberger
>         Attachments: FELIX-4473.patch
>
>
> As discussed on the list [1] a ConnectorFactory service is to be defined 
> which allows the injection of Jetty Connector objects into the running Jetty 
> server.
>     package org.apache.felix.http.jetty;
>     public interface ConnectorFactory {
>         Connector createConnector();
>     }
> *  createConnector creates a new configured (but not started) Connector 
> instance on each call
> * The Jetty bundle calls createConnector for each Jetty server started (for 
> now this is a single one).
> * The Connector is added to the Jetty server and started
> * When the Jetty server stops, the connector is stopped and discarded along 
> with the Jetty server
> * When the ConnectorFactory is stopped, the Connector has to be stopped and 
> removed from the Jetty server
> [1] http://felix.markmail.org/thread/wvnani5362kq5ynr



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to