• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

SCEA 5 - Entity Bean Confusion

 
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...
 
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 ]
 
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.
 
Poop goes in a willow feeder. Wipe with this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic