Create the deployable application and the jar file
Objective
Create an application file and a jar file suitable for deployment of the Hello bean.
Create Deployable Application Jar File
In this lesson, you will be creating the deployment descriptor (DD) and packaging it, together with the bean's class files, in a deployable jar file.
In the J2EE reference implementation the jar file is packaged in an application file.
The deployment descriptor describes the bean and its properties. It is created by the bean developer. To recap, the deployment descriptor contains the following information:
Bean's name
Classes for the bean, home and remote interfaces
The bean's type
For session beans, the management type (stateful/stateless)
Environment entries
Security roles
etc.
The deployment descriptor is an XML file. It is packaged together with the classes for the bean, the home and remote interfaces, plus any other
classes the bean requires, in a jar file.
The jar file is the deployable unit for the bean. This is illustrated in the diagram below.
The DD and the jar file are created using the Java program deploytool that comes with the J2EE platform.
Creating Deployable Jar File
Create Deployable Jar File -Exercise
Create Deployable Jar File -Exercise
Now that you have seen the steps to create the application and the deployable jar file, try them yourself in the exercise that follows.
In the next lesson, you will deploy the jar file in the EJB container
Deployable unit: A deployable unit is a jar file for an EJB that contains the bean's class files and the DD used for software distribution.