felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.W. Janssen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-4473) [Jetty] Add support for Jetty Connector injection
Date Tue, 01 Apr 2014 13:24:14 GMT

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

J.W. Janssen commented on FELIX-4473:
-------------------------------------

bq. 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).  
bq. 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.

Yes, you're right. What I was referring to was that without any configuration, the default
HTTP connector is still started. If you want to override this one with a custom connector
you need to do deploy an additional bundle anyway, which makes the extra configuration for
disabling the default connector not that much of an issue.

bq. 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).

Yes, this is something we should fix along with this issue. Delaying the startup of the server
until at least one ConnectorFactory or default HTTP/HTTPS connector is configured would have
my preference (conceptually cleaner)...

Are you going to apply this patch anytime soon?

> [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)

Mime
View raw message