Jpa entity components do not support multiple views Jpa实体组件不支持多视图。
Jpa entity components are still best used behind a facade Jpa实体组件仍然在facade之后用得最好。
Jpa entity components mix implementation details into your pojos Jpa实体组件将实现细节加入您的pojo中。
You might also want to think back to the ejb 1 . x days when entity components were more like pojos 您可能也回想过ejb 1 . x时期,当时实体组件更像是pojo 。
Consider a typical ejb 2 . x entity component class declaration : public abstract class customerbean implements entitybean 我们考虑一个典型的ejb 2 . x实体组件类声明:
Ejb 2 . x entity components maintain the concept of separating the implementation from the interfaces it supports Ejb 2 . x实体组件延续实现独立于其支持的接口这种概念。
We discussed how to exploit custom home methods on entity components to serve as a built in facade 中,我们讨论了如何利用实体组件上的自定义home方法来作为facade上的构建。
Finally , you rightly pointed out that there is only one entitymanager implementation , which eliminates the need to do a jndi lookup , and makes using a jpa entity component extremely easy 最后,您正确地指出entitymanager实现只有一个,这就不需要进行jndi查找,并使得使用jpa实体组件变得异常简单。
One of the best features of ejb 2 . x entity components is that the deployer could modify the details of how a given business object was made persistent completely independently of the bean provider Ejb 2 . x实体组件的最佳特性之一是部署器可以修改使给定的业务对象的持久性完全独立于bean提供者的细节的方式。
That said and at the risk of making you unhappy again , the ejb advocate is going to very carefully parse the advantages you point out so that you can truly weigh the benefits of jpa versus cmp entity components 也就是说(又有可能要冒犯您了) , ejb advocate将会细心地分析您指出的优点,所以您可以实际对比一下jpa与cmp实体组件的好处: