File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Re: Difference between JavaBean and EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Re: Difference between JavaBean and EJB" Watch "Re: Difference between JavaBean and EJB" New topic

Re: Difference between JavaBean and EJB

Joe Cheung
Ranch Hand

Joined: Oct 18, 2002
Posts: 104
Dear all,
What is the major difference between JavaBean and EJB?

Julien Martin
Ranch Hand

Joined: Apr 24, 2004
Posts: 384
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.
roul ravashimka
Ranch Hand

Joined: Mar 16, 2004
Posts: 53
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.

MSc Electronics, ICT
Augg Stine

Joined: Mar 24, 2004
Posts: 27
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

Joined: Jul 10, 2001
Posts: 1934
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"

SCJP, blog
I agree. Here's the link:
subject: Re: Difference between JavaBean and EJB
It's not a secret anymore!