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

Sergey Beryozkin commented on CXF-7614:
---------------------------------------

Hi Carlos, 
Even if a locator returns a typed class, we still don't know how it is 
implemented, it may cause some side-effects before the requests have even 
started flowing, if we start introspecting all the tree ? This is way this is 
done only if a user requested so... 
I'm not sure what RI does in this case, but if it does apply DynamicFeature at 
the start up time to the subresources then it fails to meet the spec 
requirement that the subresources are resolved dynamically  

> DynamicFeature is not invoked for sub resources
> -----------------------------------------------
>
>                 Key: CXF-7614
>                 URL: https://issues.apache.org/jira/browse/CXF-7614
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.2.2
>            Reporter: Carlos Sierra
>            Priority: Major
>
> According to the javadoc of DynamicFeature the callback method is to be 
> invoked for relevant methods in resource or sub-resources. In the current 
> implementation methods on sub-resource are NOT being invoked.
> {code:java}
> public class ResourceWithSubResource {
>     @Path("/resource1")
>     public SubResource getResource() {
>         return new SubResource("Resource1: ");
>     }
> }{code}
> {code:java}
> public class SubResource {
>     public SubResource(String param) {
>         _param = param;
>     }
>     @GET
>     public String getParam() {
>         return "Returning: " + _param;
>     }
>     @Path("/{path}")
>     public SubResource subPath(@PathParam("path") String subPath) {
>         return new SubResource(_param + "-" + subPath);
>     }
>     private String _param;
> }
> {code}
> in the provided example a _DynamicFeature_ is only invoked for 
> _getResource()_ and it should also be invoked for relevant methods in 
> _SubResource_.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to