Let me clarify,

You are correct. From a higher level it is all Java and so you can do the
same things either way. However, when running a development shop with 30
java developers of varying skill levels it's nice to have the "hard" stuff
taken care of via EJB's instead of relying on the programmers to code this
correctly themselves. I don't mean to sound like I have an staff of imbicels
or that anyone with many Java programmers would have this problem, it's just
a simple law of programming. The more bodies on a project, the more bugs you
get. When it comes to something like pooling and other JDBC/driver type
issues, from my experience and articles I've read, programmers tend to screw
this up when doing it themselves (especially when under time constraits and
other not so fun pressures). The faster development times statement is based
in some preliminary articles I read before choosing the architecture over
some others, and that so far it is turning out to be true on my project. You
can put the "hard core" programmers to writing EJBs and tag libraries and
stick the more artsy-fartsy ones on the jsp pages. The faster development
comes from the seperation of specializations (from what I've seen). 

Hope this helps (I would have responded sooner, but I just got back in the
office)

Frank

-----Original Message-----
From: Benjamin Wong [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 29, 2001 3:09 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] RE: servlets vs. EJB



>Two problems with using a pure "Servlet to database"
>architecture is with synchonization and massive database
>hits. For smaller apps, this is probably fine, but for
>larger ones you can run into problems with improper
>record locking and poor database performance

Hmmm...I am curious. What does "row locking" and "massive database hits"
have to do with the EJB container ? Those issues can be resolved using
straight JDBC and Connection Pooling. We are in the process of re-writing a
bunch of EJBs into direct JDBC calls using servlets, but with the servlets
using a connection pool. With JDBC calls going through the same type of
connection pool that the EJB container uses (Minerva, Poolman,...etc.),
how's is the handling of  massive database hits any different ?

Even with transactions, you can do it without any EJBs by setting
autocommit, doing your own rollbacks, and setting your own transaction
isoloation levels. Sure the code may not be as modular, but I am certainly
curious as to how performance can be any less than going through the EJB
container. And any clustering of EJB containers can easily be simulated with
the same clustering of servlet containers. So load-balancing is not unique
to EJBs either. Any one care to further elucidate this issue?

> whatever) and the database. There are many other
> advantages to using an EJB architecture like having better
> seperation of code modules and faster development

The better separation of code modules I totally agree with, but I'm not sure
about faster development.

Ben Wong

----- Original Message -----
From: "Frank Thiemonge (NBK)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 29, 2001 11:20 AM
Subject: RE: [JBoss-user] RE: servlets vs. EJB


> I think you may be comparing apples and oranges a little
> bit here. Two problems with using a pure "Servlet to database"
> architecture is with synchonization and massive database
> hits. For smaller apps, this is probably fine, but for
> larger ones you can run into problems with improper
> record locking and poor database performance. EJBs help
> administer the middle ground between "front end" java (whether
> in the form of servlets, jsp, java apps, applets, or
> whatever) and the database. There are many other
> advantages to using an EJB architecture like having better
> seperation of code modules and faster development
> schedules, but that's a whole other discussion. As far
> as security, good question. I don't think so, but then
> I have no technical arguments to support that assertion.
> I'm sure some others may.
>
> Frank
>
>
> -----Original Message-----
> From: Mantri, Mr. Ramesh [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 29, 2001 12:48 PM
> To: '[EMAIL PROTECTED]'
> Subject: [JBoss-user] RE: servlets vs. EJB
>
>
> All,
> That is an interesting question. I prefer to use a mix
> of both. In my opinion, servlets are easier to develop
> than EJB. But then I am almost a newbie and could well
> be wrong. There is an important problem with EJB, I
> think. It seems to require a wide range of ports to be
> available for communication. That could pose a serious
> challenge to Network Security. What do the experts think?
> sincerely,
> Ramesh
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to