Hi,

I need a Jira-User.

You are right, I can set any set of service types as long as Object is one 
of them. I looked into the related tracker class and indeed it was only 
triggered if Object is exposed as a service type [1]. Unfortunateley I 
don't have the sources availalable here to test it right now.
I hope that I will find some time during the next days to dig deeper into 
this.


Greetings,
Peter

[1]https://github.com/ops4j/org.ops4j.pax.web/blob/master/pax-web-extender-whiteboard/src/main/java/org/ops4j/pax/web/extender/whiteboard/internal/tracker/ResourceTracker.java#L61


Am Donnerstag, 13. April 2017 23:58:27 UTC+2 schrieb Achim Nierbeck:
>
> Hi, 
>
> hmm ... you're right according to the spec, 140.6 Registering Resources, 
> it should be a pattern, therefore a /* should be trailing it. 
> could you open a bug for this? (if you need a Jira-User I'll create one)
> regarding your second question, I'm not sure it's Object only cause in the 
> pax-web sample we don't set it only to Object [1].
>
> regards, Achim 
>
> [1] - 
> https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/whiteboard-ds/src/main/java/org/ops4j/pax/web/samples/whiteboard/ds/WhiteboardResource.java#L23
>  
> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fops4j%2Forg.ops4j.pax.web%2Fblob%2Fmaster%2Fsamples%2Fwhiteboard-ds%2Fsrc%2Fmain%2Fjava%2Forg%2Fops4j%2Fpax%2Fweb%2Fsamples%2Fwhiteboard%2Fds%2FWhiteboardResource.java%23L23&sa=D&sntz=1&usg=AFQjCNEF14o8pPEmU6GCsDOLN6eLh9CRvA>
>
>
> 2017-04-13 23:19 GMT+02:00 Peter Schyma <[email protected] <javascript:>>:
>
>> Hi,
>>
>> thank you.
>>
>> I wonder whether the resource pattern is correct. I was following the 
>> example from RFC 189 that uses the trailing /* on a class extending 
>> HttpServlet without defining any explicit service type (and thus resulting 
>> in Servlet). But this service registration was not recongized by the 
>> whiteboard. After some googling I found an example that declared the 
>> service type as Object and now it was recognized and registered but not 
>> accessible due to the trailing /*.
>>
>> This yields two questions:
>> 1. Shouldn't the pattern without the trailing /* match only the /web 
>> folder (as an absolute resource mapping)?
>> 2. Why do I have to use Object as service type even though the RFC states 
>> "The service type can be any type, it is adviced to use the implementation 
>> class as the type."?
>>
>> Greetings,
>> Peter
>>
>> Am Donnerstag, 13. April 2017 21:48:09 UTC+2 schrieb Achim Nierbeck:
>>>
>>> Hi Peter, 
>>>
>>> I provided a pull request. 
>>> The issue is actually a wrong resource.pattern, it needs to be only 
>>> /resource without the trailing /*
>>> after that the resources did work correctly. 
>>>
>>> Regarding PAXWEB-1077 it's still open and will take a bit. 
>>> It's especially annoying as an update or restart of such a bundle 
>>> doesn't work. 
>>>
>>> regards, Achim 
>>>
>> -- 
>> -- 
>> ------------------
>> OPS4J - http://www.ops4j.org - [email protected] <javascript:>
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "OPS4J" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & 
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master 
>
>

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to