My configuration is
grizzly-servlet-webserver 2.0.0-M3 (and required friends)
jersey-server 1.2
jersey-guice 1.2
guice 2.0
I'm not doing much to initialize it. My ServletAdapter is configured with:
sa.addInitParameter(ResourceConfig.PROPERTY_CONTAINER_REQUEST_FILTERS,
AuthenticationFilter.class.getName());
sa.addInitParameter(ResourceConfig.PROPERTY_RESOURCE_FILTER_FACTORIES,
RolesAllowedResourceFilterFactory.class.getName());
sa.addServletListener(ProtobufServletConfig.class.getName());
sa.addFilter(new GuiceFilter(), "guiceFilter", null);
AuthenticationFilter.class is mine, jersey is working fine / answering
requests but @RolesAllowed does nothing to restrict its behavior and,
in fact, no instance of my AuthenticationFilter ever gets
instantiated.
Is it OK that my AuthenticationFilter wants to be created by
injection? I'm not seeing any guice errors saying it can't do so, and
in my ServletModule.configureServlets() I'm binding the
AuthenticationProvider class to a specific implementation.
Does that sound correct?
--C