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

when do we go for entity bean?

 
Suganthi Velliah
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Suganthi Velliah
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

could any one tell me what is JPA?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes: see this.
 
Suganthi Velliah
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for clearing my doubt Paul.
Could you tell me the new features intoduced in EJB3.0?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The best place to find this out is here.
 
Mike Keith
author
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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. :-)
 
Suganthi Velliah
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Paul,

Thanks for your reply. Sorry for the late reply since I was little busy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic