You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2013/10/21 19:54:43 UTC

[jira] [Commented] (CXF-5346) Shared filters registered through DynamicFeature are not considered

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

Sergey Beryozkin commented on CXF-5346:
---------------------------------------

Hi, works for me on the trunk, will try on CXF 2.7.x tomorrow, the way dynamic features are managed have changed on the trunk, so may be it is a 2.7.7 specific issue 

> Shared filters registered through DynamicFeature are not considered
> -------------------------------------------------------------------
>
>                 Key: CXF-5346
>                 URL: https://issues.apache.org/jira/browse/CXF-5346
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.7.7
>            Reporter: Fabien Thouny
>         Attachments: cxf-shared-dynamic-filter.zip
>
>
> When a shared filter is registered through a DynamicFeature implementation, it's not considered when reaching the matching resource :
> {code}
> @Provider
> public class DynamicFilterBinder implements DynamicFeature {
>     private static final SharedDynamicFilter SHARED_DYNAMIC_FILTER = new SharedDynamicFilter();
>     @Override
>     public void configure(ResourceInfo resourceInfo, Configurable configurable) {
>         configurable.register(SHARED_DYNAMIC_FILTER);
>     }
> } 
> {code}
> However, when we use a instance per resource, it's considered as expected :
> {code}
>  @Provider
> public class DynamicFilterBinder implements DynamicFeature {
>     @Override
>     public void configure(ResourceInfo resourceInfo, Configurable configurable) {
>         configurable.register(new NotSharedDynamicFilter());
>     }
> }
> {code}
> Please find attached, a sample project with some ITs showing the problem.
>  



--
This message was sent by Atlassian JIRA
(v6.1#6144)