Two Laptop Bag*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Entity Object Vs Entity bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Entity Object Vs Entity bean" Watch "Entity Object Vs Entity bean" New topic
Author

Entity Object Vs Entity bean

Sundar Chakravarthy
Greenhorn

Joined: Jan 09, 2007
Posts: 8
Hi,

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

Thanks,
Sundar Chakravarthy
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

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.


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Sundar Chakravarthy
Greenhorn

Joined: Jan 09, 2007
Posts: 8
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

Joined: Feb 24, 2006
Posts: 6661
    
    5

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Entity Object Vs Entity bean