Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java Beans VS EJB's

 
Jawahar Rajan
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,
As a beginner in Java programming I am often confused by the use of Java Beans and Enterprise Java Beans.
My undestanding is that EJB's are used as a business layer (contains the business logic) in web applications or enterprise development.
Java Beans alone are more reusable blocks of code typically for Graphical display - applets.
Will this new book (this week's give away) address these differences.
All opinons and suggestions are welcome.
Thanks
Jawahar
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the J2EE and EJB forum
 
Irene Loos
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this link out.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18009
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A JavaBean doesn't HAVE to be associated with a graphical component - it just has to represent an object that has properties.
EJB's carry that step further in that they provide basic JavaBean functionality with support for transaction management, safe use in a multi-threaded environment and built-in support for object persistency (in the case of Entity EJBs).
The overhead to setup and maintain EJBs (not to mention the effort to create them) is significantly higher than for simple JavaBeans. On the other hand, if you NEED the kinds of functionality that EJBs provide, EJBs give a pre-debugged framework in which to operate so you don't have to re-invent it all.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic