• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

SCEA 5 - Entity Bean Confusion

 
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
If you have a bad day in October, have a slice of banana cream pie. And this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic