• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SCEA 5 - Entity Bean Confusion

 
Paul Michael
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are two opposing views in terms of Entity Beans in EJB 3.

One is that Entity Beans have been converted to POJOs

Entity Beans
Entity Beans have been given a complete overhaul in EJB 3.0. Entity beans are plain Java objects that can be allocated with new and attached/detached/reattached to persistence storage. Entity beans are not remotable and must be access through the new javax.persistence.EntityManager service. JBoss's EJB 3.0 implementation is built on top of Hibernate.


While the other (see Chapter 6 of Mastering EJB 4th Edition) discusses that this new programming model is "not an enhancement to Entity Beans but rather a completely new programming concept".

I cannot remember the specific questions asked on this subject but do you think choosing either one of the different views would still lead us to the answers which SUN thinks should be the correct one?

Hope my silly questions do not bore you...
 
Bob Treacy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JPA Entities in EJB 3.0 are not entity beans. The JBoss statement expresses this by saying that entity beans have been given a complete overhaul in EJB 3. It would be better not to call them entity beans at all. I think that the statement in Mastering EJB 4ed is clearer on this. The spec does not use the words entity beans except when talking about EJB 2.1, It uses the term EJB 3.0 entities instead


--------

SCBCD 1.3
SCBCD 5

[ November 05, 2007: Message edited by: Bob Treacy ]

[ November 05, 2007: Message edited by: Bob Treacy ]
[ November 05, 2007: Message edited by: Bob Treacy ]
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Michael Laborte:
(see Chapter 6 of Mastering EJB 4th Edition) discusses that this new programming model is "not an enhancement to Entity Beans but rather a completely new programming concept".


The quote above describes it well. JPA and Entity Beans are two different things. I can explain Entity Beans in EJB 3.0 only in that, that it exists for backward compatibility.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic