could someone one the current list of managed Beans or classes in Java EE 5,6,7?
apart from EJBs and JSF managed beans, are they other classes ?
In the book ” EJB 3 in Action”, at chapter 5 (learning advanced EJB concepts) it got mentioned that:
“DI is supported only in the managed classes and that you cannot use
injection in helper or utility classes.”
That’s why I wanted to know what are the managed beans that can in general support Dependency injection.
-please don’t forget to mention online references and doc, if any –
thanks in advance.
As of EE 6:
Since specifications are expected to build on top of the managed beans specification, the platform specification does not provide a comprehensive list, so you would have to review each specification included in EE 6. My evidence for JSF is the weakest, since the latest JSF specification does not explicitly state that it builds on top of the managed beans specification. However, the managed beans specification itself states that it is intended as a generalization of JSF.
That said, table EE.5-1 in the EE 6 platform specification contains the list of component classes supporting injection, PostConstruct, and PreDestroy. This list is arguably more useful than knowing which a list of component technologies that are explicitly “managed beans”.