Describe the Deployment Descriptor and the Jar File.
Describe the Deployment Descriptor and the Jar File
Beans and their deployment descriptors can be packed in Java jar files to make a uniform deployment unit.
The jar file
The jar file is built with the Java jar program and contains the following:
One or more beans
A deployment descriptor for each bean
Application assembly instructions
Supporting classes and files
The deployment descriptor (DD) describes everything that is needed to actually deploy a bean. In detail, the DD contains both
structural and assembly information.
The structural information describes the structure of a bean and declares the external dependencies.
It contains, at a minimum, the bean's
transaction settings, and
The home interface is used to find or create. The remote interface is used by the client and maps to the business methods of the bean.
The DD is written in XML
You may also wonder what format the DD takes. In version 1.1 of EJB the DD is described in terms of XML. Question: Does this mean that you will have to learn XML to use EJBs? Answer: Fortunately not.
Your EJB server or container vendor will provide an interactive tool that will make it easy for the bean developer and the deployer to edit values in the deployment descriptor and create and use the jar files.
In the next lesson, the different roles that developers play in developing EJBs will be discussed.
Deployment descriptor: Information that describes both the structure of an Enterprise Java Bean, and the information required by it at runtime.
Jar file: A file created with the Java jar program which is similar to tar on the Unix platform.