EJB directory structure

This page discusses - EJB directory structure

EJB directory structure

EJB directory structure

     

The tutorial is going to explain the standard directory structure of an EJB application . The figure given below is taken of Netbeans IDE. Here in the given figure NewsApp is the application name of the project which we have created. The other files which are created are described below:-

MANIFEST.MF:-This is the file which provides meta-information for the JAR. This file is a standard component of a JAR file. It is used to extend the class path that is being used by the EJB module.

NewsApp-ejb.jar:-This is the jar file which is used for compressing, packaging, and delivering several files together. The use of  the JAR file in EJB is to package all the interfaces and classes that are associated with  beans into one file. This file contain the following files :-

1) XML deployment descriptor
2) bean classes
3) remote and home interfaces
4) primary key class
5) interfaces

NewsApp-war.war:-
This is the file in which we deploy the  ejb remote interfaces and the stub classes .This file includes the EJB client classes

NewsApp-ejb:-This is the EJB module where we have stored beans and interfaces.

NewsApp-war:-This is the web module for our project. Here we have created the servlet and JSP pages.

Figure: EJB Directory Structure in NetBeans

Above given is the standard directory structure of the Enterprise Java Bean application. Just follow the above mentioned steps and test your EJB application using NetBeans.