Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Entity Object Vs Entity bean

 
Sundar Chakravarthy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What is the difference between the two and when is each created ?

Thanks,
Sundar Chakravarthy
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that question is too vague to attract a correct response. Here are some pointers...

An entity bean may exist when the underlying entity exists.

When the entity is removed the bean goes back to the pool.

When there are too many beans in the pool some are destroyed by calling unSetEntityContext().

An underlying entity may exist without an entity bean ever referring to it.

Not every entity bean has an EJB object ( Methods executed in the pool ). In this case a single entity bean becomes the spokesperson for all entity beans in the pool.
 
Sundar Chakravarthy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.

But the spec ( 2.0 ) seems to distinguish between entity object and entity bean. I am not sure if entity object is the same as EJBObject for the entity bean or not.

Sundar
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
entity object is the same as EJBObject ?


That is what I was thinking too. I think the exam explicitly mentions the name "EJB Object". I didnt encounter any questions that were vague in differentiating the entity bean from the EJB object used to get to that bean.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic