开发者

EJB 2.1 Entity beans vs. EJB 3.0 Entity beans

开发者 https://www.devze.com 2022-12-10 19:50 出处:网络
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 a

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号