Chapter 10. Integration with CDI - 0 views
-
Chapter 10. Integration with CDI
- ...37 more annotations...
-
10.1. Configuration with Servlet 3 On Servlet 3 compliant containers, GraniteDS can use the new APIs to automatically register its own servlets and filters and thus does not need any particular configuration in web.xml. This automatic setup is triggered when GraniteDS finds a class annotated with @FlexFilter in one of the application archives:
-
@FlexFilter(configProvider=CDIConfigProvider.class) public class GraniteConfig { }
-
tide=true, type="cdi", factoryClass=CDIServiceFactory.class, tideInterfaces={Identity.class}
-
It is possible to benefit from even more type safety by using the annotation [Inject] instead of In. When using this annotation, the full class name is used to find the target bean in the CDI context instead of the bean name.