EJB 3.1 @EJB Injection into POJO
问题 With the new EJB 3.1 spec is it possible to inject an EJB into a pojo? I know in EJB 3.0 the @EJB annotation could be used to inject an EJB but this did not work on simple pojos. If it is not do I have to look the bean up in JNDI as I know you cannot simple use the new keyword. 回答1: Yes, use JNDI lookup. Since your POJO is created by you (I assume), the container is not responsible for injecting the dependencies. 回答2: With the new EJB 3.1 spec is it possible to inject an EJB into a pojo? I