简体   繁体   中英

EJB 2.1 Entity beans vs. EJB 3.0 Entity beans

I had this doubt 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM