felix-dev mailing list archives

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

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

Derek Baum commented on FELIX-5344:

Hi Carsten,

This isn't working for me at all;

e.g. webconsole is not found.

I updated to revision 1760601 and did 'mvn clean install'. all tests passed.

I then tried: rm -rf ~/.m2/repository/org/apache/felix/org.apache.felix.http*/*-SNAPSHOT

and repeated: mvn clean install

This failed due to a missing dependency: org.apache.felix.http.jetty-3.2.3-SNAPSHOT

(I obviously had a cached version of this in ~/.m2).

This dependency is in itest/pom.xml. I changed this to be 3.2.5-SNAPSHOT.

mvn clean install now fails the integration tests.

Tests run: 80, Failures: 36, Errors: 1, Skipped: 0


> 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, 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

View raw message