Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.7.7
-
None
-
Unknown
Description
When a shared filter is registered through a DynamicFeature implementation, it's not considered when reaching the matching resource :
@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); } }
However, when we use a instance per resource, it's considered as expected :
@Provider public class DynamicFilterBinder implements DynamicFeature { @Override public void configure(ResourceInfo resourceInfo, Configurable configurable) { configurable.register(new NotSharedDynamicFilter()); } }
Please find attached, a sample project with some ITs showing the problem.