>>> "Nevarez, Benjamin" <[EMAIL PROTECTED]> 15-May-01
1:23:24 AM >>>

>Also, if you do not use a J2EE server and decide to
>write some of the features of the J2EE server like
>transaction management, security, database connection
>pooling, life cycle management, etc. you are spending
>more money on development time and also on
>maintenance time.

I was not suggesting re-writing these things when you need them. But
all are available outside the EJB environment and you rarely need all
of them.

My accounts system, for example, does't need transaction management
because it's designed to happen inside the method where I can easily
use JDBC transaction management (which is *slightly* more efficient).

JDBC Connection pools are available from all sorts of places (they're
actually in the JDBC API now).


The great thing about EJB is that it brings everything together in an
easy way, the server provides access to the connection pool and access
to transaction management. But that just saves you a few import
statements really and there is a performance cost involved.



>Let me tell you a little about the cost. There are several
>free J2EE servers available (and also you can get the
>source code for some of them if you want to play with it).

Yes. For those listening Jonas is an open-source EJB server.


>The hardware requirements are not much different from a
>JSP/servlet engine for the same application.

I disagree. There are quite a few extra costs associated with using
EJBs:

- all the resources are held in JNDI references so there's a
hashtable lookup for each resource you get hold of.

- EJBs rely in part on introspection which is an expensive startup
cost.

- containers have to take time out to serialize and de-serialize
beans


Plus because EJB is so complex it's difficult to check how good
things like object re-use really are. And if the objects are being
reused are they being reused efficiently.


As a rule of thumb I steer away from things where there is a lot to
go wrong. With EJB there is a lot to go wrong.


Nic

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to