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 java Beans VS EJB's 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 "java Beans VS EJB Watch "java Beans VS EJB New topic

java Beans VS EJB's

Jawahar Rajan
Ranch Hand

Joined: Feb 28, 2002
Posts: 38
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.
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Moving this to the J2EE and EJB forum

Irene Loos
Ranch Hand

Joined: Apr 15, 2002
Posts: 78
Check this link out.

Irene Loos
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

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.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: java Beans VS EJB's
It's not a secret anymore!