EJB 2.1 Entity beans vs. EJB 3.0 Entity beans
I had this doubt 开发者_JAVA百科for sometime now, some people say that there's no such thing called entity beans in EJB 3.0. Is there any possibility to say so, EJB 3.0 uses JPA to persist the data and there's no enhancement to the entity beans from the previous version (EJB 2.1) it's just brought back.Another fact is EJB 2.1 uses abstract POJOs and EJB 3.0 uses non-abstract POJOs. I need some clear description about these facts.
The entities managed by EJB3/JPA are not EJBs, they're just POJOs. The entities in EJB 1/2, however, are EJBs, with strict restrictions on their hierarchy.
EJB2-style entities are now completely redundant, they're only supported in EJB3 containers for backwards compatibility.
精彩评论