EJB or web application modules can be deployed either by themselves or as a part of an enterprise application.
Likewise, Java application clients can be either regular Java desktop applicaitons, or can be
full Java EE application client modules. Adding an EJB module, web module, or application
client module to an enterprise application lets you further configure the way those modules interact with each other.
When you add a module to an enterprise application, the IDE does the following:
Lists the module under the enterprise application's Java EE Modules node.
Adds the module project to the enterprise application project's list of
required projects. This means that the module project is cleaned and built
whenever you clean and build the enterprise application project.
Packages the module's build output (JAR file or WAR file) into the enterprise
application's EAR file when building the project.
To add an existing module to an enterprise application:
Open the module project and the enterprise application project.
In the Projects window, right-click the enterprise application node for
the Java EE application and choose Add Java EE Module.
In the dialog box, select the module and click OK.
You can only add to an enterprise application. You cannot add
to an enterprise application because the build and deploy process is not controlled by the IDE.