I'm using JSF with EJB. In my JSF managed beans, the dependency injection through @EJB annotation works fine. However, in my custom JSF Validator and Convertor classes, the @EJB annotation doesn't work. The annotated variable remains null and throws a NullPointerException later. Is there anything I am missing about dependency injection in EJB? I thought that I can use @EJB annotation in any container managed class (which JSF Validators and Convertors are).
Thanks for any input,
Supporting resource injection on JavaServer Faces technology renderers, converters, or validators is not desirable because that would violate Model-View-Controller (MVC) separation of these presentation objects. If these classes need to get access to resources, they should do so through a managed bean.