Incur less overhead than CGI scripts. Conform to an API that is consistent on all web servers. Are supported on a wide variety of web servers. You can use servlets to create middle tiers for simple applications that require access to back-end data stores and services. However, if your applications require transaction management and must support many concurrent users, you should build your middle-tiers with Enterprise JavaBeans TM technology.
Enterprise beans contain the business logic that is invoked by the clients.
Enterprise beans reside in an EJB container, which runs on an EJB server. Life cycle managment. Because the container provides these system-level services, the application developer is free to concentrate on the business logic in the enterprise beans. For example, the developer does not have to code and debug complex routines to connect the clients and the enterprise beans. After creating the enterprise bean, the client invokes its methods as if it were just another object in the same virtual machine.