]
Ron Sigal resolved WFLY-2495.
-----------------------------
Resolution: Out of Date
ContainerXFilter not invoked when registered via DynamicFeature in
JAX-RS
-------------------------------------------------------------------------
Key: WFLY-2495
URL:
https://issues.jboss.org/browse/WFLY-2495
Project: WildFly
Issue Type: Bug
Components: REST
Affects Versions: 8.0.0.Beta1, 8.1.0.Final
Reporter: Aslak Knutsen
Assignee: Ron Sigal
Priority: Major
{code}
@Provider
public class DynamicServerLogggingFilterFeature implements DynamicFeature {
@Override
public void configure(ResourceInfo ri, FeatureContext fc) {
if (MyResource.class.isAssignableFrom(ri.getResourceClass())
&& ri.getResourceMethod().isAnnotationPresent(GET.class)) {
fc.register(new ServerLoggingFilter());
}
}
}
@Provider
@ServerLogged
public class ServerLoggingFilter implements ContainerRequestFilter,
ContainerResponseFilter {
...
}
{code}
DynamicServerLogggingFilterFeature is called the the ServerLoggingFilter is registered in
the FeatureContext, but the filter(ContainerXContext crc) is never called on the
ServerLoggingFilter.
Sample:
https://github.com/arun-gupta/javaee7-samples/tree/master/jaxrs/dynamicfi...