felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (FELIX-5344) HTTP_WHITEBOARD_TARGET doesn't work reliably
Date Tue, 13 Sep 2016 20:12:20 GMT

     [ https://issues.apache.org/jira/browse/FELIX-5344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Carsten Ziegeler updated FELIX-5344:
------------------------------------
    Fix Version/s: http.jetty-3.2.6
                   http.base-3.0.14

> HTTP_WHITEBOARD_TARGET doesn't work reliably
> --------------------------------------------
>
>                 Key: FELIX-5344
>                 URL: https://issues.apache.org/jira/browse/FELIX-5344
>             Project: Felix
>          Issue Type: Bug
>          Components: HTTP Service
>    Affects Versions: http.base-3.0.12, http.jetty-3.2.4
>            Reporter: Derek Baum
>             Fix For: http.base-3.0.14, http.jetty-3.2.6
>
>
> I am trying to use HTTP_WHITEBOARD_TARGET to match a specific http instance:
> (I'm actually experimenting with multiple http instances, but the problem occurs with
a single instance).
> @Component(service = Servlet.class,
> 	property = {
> HttpWhiteboardConstants.HTTP_WHITEBOARD_TARGET + "=(org.osgi.service.http.port=7777)"
>         })
> I am configuring http.jetty using config admin (via fileinstall)
> I have disabled automatic jetty startup using:
> org.apache.felix.http.enable=false
> Now I start jetty by dropping the file org.apache.felix.http.cfg into the fileinstall
load directory:
> org.apache.felix.http.enable=true
> org.osgi.service.http.port=7777
> and my servlet is not always registered.
> This appears to be because WhiteboardManager.addWhiteboardService() is being called before
the http service properties have been set.
> Here's the output of some debug I added to isMatchingService():
> XXXtarget =(org.osgi.service.http.port=7777) match=false
> XXXprop objectClass=[Ljava.lang.String;@292aebaf
> XXXprop osgi.http.service.id=[60]
> XXXprop service.bundleid=22
> XXXprop service.id=61
> XXXprop service.scope=singleton
> It doesn't contain any endpoint properties.
> To prove this is a timing issue, I stopped and started my web bundle, which then registered
correctly. The corresponding debug is:
> XXXtarget =(org.osgi.service.http.port=7777) match=true
> XXXprop objectClass=[Ljava.lang.String;@292aebaf
> XXXprop org.apache.felix.http.enable=true
> XXXprop org.apache.felix.https.enable=false
> XXXprop org.osgi.service.http.port=7777
> XXXprop org.osgi.service.http.port.secure=8443
> XXXprop osgi.http.endpoint=[Ljava.lang.String;@1d1447fa
> XXXprop osgi.http.service.id=[60]
> XXXprop service.bundleid=22
> XXXprop service.id=61
> XXXprop service.scope=singleton



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message