Reputation: 97
I have simple Apache Meecrowave 1.2.1 (OWB+CXF) application with ContainerRequestFilter:
@Singleton
@Provider
public class AppInstanceAndSecurityFilter implements ContainerRequestFilter {
...
@Inject
private AppInstanceService appInstanceService;
...
@Context
private ResourceInfo resourceInfo;
...
}
AppInstanceAndSecurityFilter class is returned in getClasses() method of Application subclass.
The problem is that filter is called twice and there are two instances of filter - one with all successfully resolved @Inject and @Context references and one with all @Inject references null and all @Context references successfully resolved.
Why there are two instances of filter, one with null @Inject references?
Upvotes: 0
Views: 416