Java EE – inject EJBs into domain objects using Java EE 6
•
Java
How to inject EJBs into domain objects (JPA entities) using Java EE 6?
Solution
In Java EE 6, CDI extends the concept of managed components to anything and injects EJBs into CDI managed beans (using @ inject annotation) However, although considering the interaction between JPA and CDI, this is not part of the Java EE 6 specification In other words, it is impossible to inject JPA entities
You can also have a look
> CDI injection broken between POJOs
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码