You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2016/09/16 05:49:20 UTC

[jira] [Resolved] (FELIX-5344) HTTP_WHITEBOARD_TARGET doesn't work reliably

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

Carsten Ziegeler resolved FELIX-5344.
-------------------------------------
    Resolution: Fixed

> 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
>            Assignee: Carsten Ziegeler
>             Fix For: http.base-3.0.14, http.jetty-3.2.6, http.bridge-3.0.14
>
>
> 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)