Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Re: Difference between JavaBean and EJB

 
Joe Cheung
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
What is the major difference between JavaBean and EJB?
Regards,
Joe
 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JavaBean is just a plain java class that complies with a few requirements (namely getter and setters, + public no-args constructor).
The EJB is much more sophisticated and lives inside a container. The container offers many services and take charge of most of the low-level tasks for you.
Julien.
 
roul ravashimka
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
A EJB can be deployed and work as a standalone component.
A JavaBean can't be deployed, it's a part of a bigger system. This bigger system can be run. Think of it as a helper object.
Grz,
Roul
 
Augg Stine
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java Bean is an ordinary class.
But EJB is designed to run in the J2EE framework & act as an enterprise component.
Hope i'm clear to you
regards/ Augg
 
Kishore Dandu
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please use search on this forum to get to these kind of often asked questions.
You can also search on google
example: "EJB Javabean difference"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic