# New EJB Module Wizard: Server and Settings

This wizard creates a new standard project containing an EJB module. You open the wizard by opening the New Project wizard and selecting the EJB Module template from the Java EE category.

In the Server and Settings page, you have to set the following properties:

Element | Description
--- | ---
Add to Enterprise Application | Lets you add the EJB module to any open enterprise application project.
Server | Specifies the server to which the EJB module is deployed. You can only deploy EJB modules to a Java EE server such as the GlassFish application server. You can register multiple remote instances of the application server. You can click Add to register a server using the Server Manager.
Copy Server JAR Files to Libraries Folder | If you are using a dedicated folder for storing libraries, you can select this option to copy the server JAR files required for compilation into the dedicated libraries folder. If not selected, other users will need local copies of the server JAR files to build the project.
Java EE Version | Specifies the level of the EJB specification that is used by the EJB.
Source Level Recommendations | One of the following checkboxes will appear if JDK 1.5 is set as the default platform in the Java Platform Manager. The J2EE 1.4 and J2EE 1.3 specifications do not recommend JDK 1.5. Therefore, if you want to create a portable application, select the appropriate checkbox:
Use JDK 1.4 and Set Source Level to 1.4 | This checkbox appears if JDK 1.4 is available in the Java Platform Manager. Select this checkbox to set both your JDK level and your source level to 1.4.
Set Source Level to 1.4 | This checkbox appears if JDK 1.4 is not available in the Java Platform Manager. Select this checkbox so that at least your source level is set to 1.4.
Enable Contexts and Dependency Injection | Contexts and Dependency Injection (CDI) is specified by JSR-299. This option is not visible if Java EE 7 Web is set as the Java EE version with Glassfish 4 because it is enabled by default. When selected, this option generates a `beans.xml` file in the project's `WEB-INF` folder when the project template is created. The `beans.xml` file is used by CDI to instruct the Java EE-compliant server that the project is a module containing CDI beans.

When you click Finish, the project is created on your computer and opened in the IDE. You can view its logical structure in the Projects window and its file structure in the Files window.

Note: If you are creating an EJB module with existing sources, you must click Next to specify existing sources and libraries.

Related Topics

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.