- The enterprise application is delivered to the client as a .ear file having a no of .jar files, settings, other libraries , deployment descriptors and other web resources.
- A deployment descriptor is an XML document with an .xml extension that describes the deployment settings of an application, a module, or a component.
- At runtime the J2EE container reads the deployment descriptors and acts upon the application, module or component accordingly.
- Two types of Deployment descriptor
- J2EE Deployment Descriptors:-Defined by the J2EE Specification. It can be used to configure settings for any J2EE compliant implementation.
- Runtime Deployment Descriptors: - It is used to configure J2EE implementation specific parameters.
- J2EE Deployment Descriptors:-Defined by the J2EE Specification. It can be used to configure settings for any J2EE compliant implementation.
The container is responsible for loading, activating, and in general maintaining the "life-cycle" of objects it provides. EJB have a fairly complex life-cycle. There are several kinds of EJB: Session Beans: These may be either stateful or stateless, and are primarily used to encapsulate business logic, carry out tasks on behalf of a client, and act as controllers or managers for other beans. Entity Beans: Entity beans represent persistent objects or business concepts that exist outside a specific application's lifetime. They are typically stored in a relational database. Entity beans can be developed using bean-managed persistence, which is implemented by the developer, or container-managed persistence, implemented by the container. Message-Driven Beans : Message-driven beans listen asynchronously for Java Message Service (JMS) messages from any client or component and are used for loosely coupled, typically batch processing.