Other than having "JavaBean" in the name, they are totally different things
with different purposes. Ordinary JavaBeans are more client-side technology,
either visual (like some kind of GUI widget) or non-visual (a timer bean
e.g.) Even beans used in JSPs and Servlets are in most respect client-type
beans (clients to a database server or an EJB, perhaps).

Enterprise JavaBeans (EJBs) on the other hand are STRICTLY server side beans
(there is some client side code associated with each EJB - stubs used to
communicate across the wire to the actual EJBs). EJBs do not exist outside
of an EJB server such as the J2EE Reference Implementation, WebSphere,
WebLogic, etc. They cannot act as client side GUI widgets like an ordinary
bean. They represent either business entities (called entity beans - things
like customers, accounts, orders, etc.) or business processes (called
session beans - actions like logging in to a system, placing an order, etc.)

So EJBs will not (and cannot) replace regular JavaBeans. Likewise regular
JavaBeans will not (and cannot) replace EJBs. They are separate (although
occasionally complementary as in a non-visual JavaBean in a servlet or JSP
that fronts/communicates with an EJB) technologies that happen to share a
similar name and some high level abstract concepts.

Eddie Sheffield


----- Original Message -----
From: "Apollo Mcowiti" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 05, 2000 7:43 PM
Subject: Re: EJB and JavaBeans


> True, but
> I still tend to  think that with the neat way EJB envisions(spelling?) to
> solve the distributed computing problem, it is here to stay for a long
time.
> And when there have been well defined core EJBs for most enterprises(don't
> they all use similar business logic?)we should achieve OO's dream of (a
high
> percentage ) code reuse,and then ordinary beans should really die.
>
> apollo
>
> -----Original Message-----
> From: Jim Preston [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 05, 2000 5:54 PM
> To: [EMAIL PROTECTED]
> Subject: Re: EJB and JavaBeans
>
>
> I don't think it's a question of replacing. EJBs are essentially a
super-set
> of ordinary beans, and the latter will certainly have their place in the
> scheme of things for a while to come. Besides, ordinary beans aren't
really
> a "thing", it's more a set of conventions that enable a Java class to be
> used in certain ways, like being called from the get/setProperty tag of a
> jsp. Finally, EJBs require an EJB-enabled server, so their use is more
> restricted. Look at it this way: electric screwdrivers have many
advantages
> over the old manual kind, but you can still buy both in the stores, and
> sometimes a manual one is better suited to the job at hand (no pun
> intended).
>
> --Jim Preston

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to