You configure your EJB modules at several different levels.
Project Contents and Classpath
Basic project settings like the EJB module's source roots and classpath are
set in the module's Project Properties dialog box. You open this dialog box
by right-clicking the EJB module's project node and choosing Properties.
For , you can add source roots in the Sources page of the Project Properties
dialog box. You can quickly add to the compilation and test classpath by right-clicking
the Libraries or Test Libraries node in the Projects window. To further configure
the classpath, or to specify which items should be included in deployment, use
the Libraries page of the Project Properties dialog box.
You should never add one source root to two IDE projects.
Deployment Settings
There are several key steps to configuring deployment settings:
Setting the target server. You have to register
an instance of the application server before you can set it as the target
server for a project. You can set the target server instance for an EJB module
by doing any of the following:
Specifying the server in the New Project wizard when creating the project.
Going to an EJB module's Project Properties dialog box and setting the
target server in the Run page.
Adding the module to an enterprise application. The EJB module is then
deployed to the same server instance as the enterprise application.
Adding the EJB module to a Java EE application. You can add an EJB module
to an enterprise project by doing any of the following:
Specifying the enterprise application in the New Project wizard when
creating the EJB module project.
Right-clicking the enterprise application project node or the Java EE Modules node
in the enterprise application project and choosing Add Java EE Module.
Configuring deployment descriptors. The IDE automatically updates
your general deployment descriptors as you code your EJB module. Whenever
you insert a call to an enterprise bean or create select or finder methods,
the IDE automatically enters the necessary information in your deployment
descriptors.
For the GlassFish application server, the IDE also makes andy necessary changes to the
server-specific deployment descriptor as you edit your EJB module. For all
other application servers, you have to write the server-specific deployment
descriptors yourself. You can edit a deployment descriptor by expanding
the EJB module's Configuration Files node and double-clicking the deployment
descriptor node.