aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes when do we go for entity bean? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "when do we go for entity bean?" Watch "when do we go for entity bean?" New topic
Author

when do we go for entity bean?

Suganthi Velliah
Greenhorn

Joined: Apr 30, 2007
Posts: 17
Hi friends,
In what kind of applications, we prefer entity beans?
Please tell me real time example...Also tell me the reason why not we choose session bean in that case..
Awaiting for your reply...
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Session beans and Entity Beans have different purposes, they are not interchangeable. Entity Beans are an ORM technology, Session beans are more for business logic. So though you can access a data store from a session bean its primary purpose is not that.

When would you go for Entity Beans? Never. I'd recommend JPA instead.
[ June 07, 2007: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

For me, I wait till I get extremely hungry, you know the point where you could eat anything, then I will be able to eat an entity bean. I just don't like vegetables.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Suganthi Velliah
Greenhorn

Joined: Apr 30, 2007
Posts: 17
hi

could any one tell me what is JPA?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Yes: see this.
Suganthi Velliah
Greenhorn

Joined: Apr 30, 2007
Posts: 17
Thanks for clearing my doubt Paul.
Could you tell me the new features intoduced in EJB3.0?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

The best place to find this out is here.
Mike Keith
author
Ranch Hand

Joined: Jul 14, 2005
Posts: 304
Originally posted by Paul Sturrock:
Session beans and Entity Beans have different purposes, they are not interchangeable. Entity Beans are an ORM technology, Session beans are more for business logic. So though you can access a data store from a session bean its primary purpose is not that.

When would you go for Entity Beans? Never. I'd recommend JPA instead.


Suganthi, be thankful you posted on this forum. Paul may have saved you from a fate worse than simple obsolescence. :-)


-Mike
Pro JPA 2: Mastering the Java Persistence API
Suganthi Velliah
Greenhorn

Joined: Apr 30, 2007
Posts: 17
hi Paul,

Thanks for your reply. Sorry for the late reply since I was little busy
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: when do we go for entity bean?