Although a cluster of servlet containers can simulated a cluster of EJB
containers, if you put both together you can achieve even greater
scalability for your system ! This is one of the advantages of having a
logic tier in your architecture as it gives you another point of
scalability.
Of course EJBs are no silver bullets and there are overheads with JNDI
lookups, network traffic and transaction support, however with good design
and the use of patterns such as ValueObject and DistributedFacade you can
avoid these traps and leverage the benefits of the EJB model.
Jonathan
-----Original Message-----
From: Benjamin Wong [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 30 June 2001 8:09 a.m.
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