What is Deployment descriptor?- A deployment descriptor is a configuration file for a web application or EJB application which is to be deployed to web or EJB container.
- The deployment descriptor should contain standard structural information for all enterprise beans in an EJB application.
- The file name is ejb-jar.xml, the descriptor of EJB informs the EJB server about the classes that make up the implementation of bean, the both home and remote interfaces.
- A standard deployment descriptor should contain structural information for each enterprise bean.What is Deployment descriptor?- Deployment Descriptor is an XML document with .xml extension.
- It basically describes the deployment settings of an application or module or the component.
- At runtime J2EE server reads the deployment descriptor and understands it and then acts upon the component or module based the information mentioned in descriptor.
- For example EJB module has a deployment descriptor ejb-jar.xml where we mention whether it is session or entity or message driven bean and where the Bean classes located are and what type of transaction etc.
- In a simple word, without deployment descriptor the Container (EJB/Servlet/JSP container) will not know what to do with that module.
- A deployment descriptor is a file that defines the following kinds of information:
- EJB structural information, such as the EJB name, class, home and remote interfaces, bean type (session or entity), environment entries, resource factory references, EJB references, security role references, as well as additional information based on the bean type.
- Application assembly information, such as EJB references, security roles, security role references, method permissions, and container transaction attributes.
- Specifying assembly descriptor information is an optional task that an application assembler performs.
|