<Kent>
Disadvantages are added complexity, all calls to EJB's are remote even if
your EJB server is on the same machine, even calls from one EJB to another
is remote.
</Kent>
Truth, but there are bigger problems with EJB IMHO (which many others also
expressed on EJB-Interest):
1. EJB Spec forbids concurrent processing, so forget about using threads or
including any external libraries since you do not know if they use threads
inside. JMS (as supposed to be included in future EJB 2.0 spec) does not
solve this problem at all since it addresses only asyncronous execution.
2. Prohibition of any IO (try to read XML file using XML parser which many
of us now take as a givem).
3. Your design has to gravitate from normal OO design to the design where
main factors are not main OO principles but rather bean execution
optimization, for instance you cannot afford fine-grained entity beans.
4. In general, no matter how we try to avoid it, our entity beans begin to
resemble tables, and most of the logic is concentrated on DB operations. If
your programming approach is db-driven why bother with EJB and not use
ColdFusion then.
5. CMP proved to be unusable for many situations, many had to resolve back
to BMP.
6. Basic programming concepts are very difficult to implement. Try to create
business class such as singleton using EJB.

I personally found JSP model 2 approach very appealing as the one that works
today, not because some future spec version can address it.
JSP/ActionServlet/Business Classes/JDBC works fine for most cases, and JDBC
even provides connection pooling nowadays.

On the good side, EJB is supposed to provide failover (not for stateful
beans at the moment however) and load balancing.
Probably main advantage of EJB is that it looks well on your resume. Many
companies hiring Java people require EJB because vendors market it
aggressively (no wonder, given the prices they charge for EJB servers).

Vadim Shun
NEW Corp
Dulles, VA

-----Original Message-----
From: Kent Symanzik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 17, 2000 7:33 AM
Subject: Re: Using EJB or JavaBeans ( MCV architecture )


I would not use EJBs unless your application warrants it.  If your team is
green and you are on a very tight schedule I would not try to use EJBs.
They add a whole new level of complexity and if you do not design your EJB
implementation correctly you will have performance issues to deal with.

The advantages of using EJB's are scalability since your EJB's can run on
servers other than your webserver and can service multiple webservers.  You
also can have more than one EJB server that support multi-server
transactions.

Disadvantages are added complexity, all calls to EJB's are remote even if
your EJB server is on the same machine, even calls from one EJB to another
is remote.  For significant applications you will have poor performance
unless you control the way your EJB's are accessed.  There are a number of
design patterns for doing this.  One common fallacy is to just make all your
domain objects EJB's.  This is what we all want to do but it results in a
unreliable (since everything is remote) and poor performing system.

It may sound like I don't like EJB's but that is not true.  I think they are
a great idea but I'm just warning that there are many complex issues
involved in implementing a successful application using EJBs.

Kent

----- Original Message -----
From: Tom Gordon <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 16, 2000 2:37 PM
Subject: Re: Using EJB or JavaBeans ( MCV architecture )


> Hi, I am also pondering whether to use EJB in conjunction with JSP and
> servlets.  Did you ever get an answer to this question?
>
> Thanks,
> Tom
>
>
> "Bragg, James" wrote:
> >
> > What is the advantage of using EJB over JavaBeans (as the Model) in an
web
> > based application in which JSP will be used for Presentation(View), and
> > Serlvets as the Controller.
> >
> > If I wasn't using Servlets as the Controller, I could seen the need for
EJBs
> > over JavaBeans for Security, Transaction Management and Session
control...
> >
> > Problem is that I have a very small, very green(new to these
technologies)
> > develpment team trying to learn and develop this application in a very
short
> > timeframe.  So the issue is do we include EJB and increase risk of
missing
> > target date, or settle for JavaBeans and reduce the capabilies of the
web
> > app.
> >
> > What is Advantage of using EJB over JavaBeans when used as the Model?
> >
> > thanks..
> >
> > James
> >
> >
===========================================================================
> > 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
>
>
===========================================================================
> 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
>

===========================================================================
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