This wizard creates a new containing an EJB module. You open the wizard by opening the
New
Project wizard and selecting the EJB Module with Existing Sources template
from the Java EE category.
Your existing EJB module source does not have to adhere to any particular directory
structure. You specify the locations of the configuration files, libraries,
and source roots. The only requirement is that the module contain a valid ejb-jar.xml
deployment descriptor.
In the Existing Sources and Libraries page, you specify the following properties:
Configuration Files Folder. Specifies the location of your deployment
descriptors and other configuration files. You must have at least a valid
ejb-jar.xml deployment descriptor to complete the wizard.
The IDE does not convert deployment descriptors for unsupported application
servers to GlassFish deployment descriptors.
Libraries Folder. Specifies the location of the class libraries that
the EJB module depends on. All JAR files in this folder are added to the EJB
module project's classpath and packaged with the module for deployment.
The IDE only scans this folder once when you create the project. After
the project is created, adding JAR files to this folder outside the IDE
does not add them to the module's classpath. You have to add them manually
through the Libraries tab of the module's Project Properties dialog box.
You can also specify each of the project's source package folders (containing
source packages) and test package folders (containing JUnit tests). You can
have multiple source roots in a standard project, with the following exceptions:
The source root cannot already exist in another IDE project.
The source root cannot already be added to another compilation unit of the
same project. For example, a source root that is registered under Test Packages
cannot be added to the list of Source Packages.
All of the source roots are packaged into the same JAR file and share the
same classpath.
If you have a source root that needs to be used by several projects, you
should create a separate project for the source root and set
up compilation dependencies between the projects.