Show TOC

Procedure documentationCreating EJB 3.0 Projects in the Developer Studio Locate this document in the navigation structure

 

Before you create an enterprise bean, you need an EJB 3.0 project to which you can assign it. The EJB 3.0 project also contains the deployment descriptors that will be included in the EJB JAR file.

Procedure

  1. Choose FileNewProject... from the main menu.

  2. Choose EJBEJB Project on the New Project screen. Choose Next.

  3. Enter a name for your new EJB project in the Project name field.

  4. If you want to add your project to an EAR, select Add project to an EAR and enter a name for your EAR project in the EAR Project Name field.

  5. If you want to configure the project facets in your EJB project, choose Modify in the Configuration section. You can leave the default settings or you can add additional facets, such as Java Persistence. Choose OK and then Next.

  6. If you want you can generate the ejb-jar.xml deployment descriptor. Select the Generate deployment descriptor checkbox. This automatically generates the ejb-jar.xml in your EJB project.

  7. Choose Finish.

Result

The project appears in the Project Explorer. It has an ejbModule folder and the SAP-specific deployment descriptor: ejb-j2ee-engine.xml.

Note Note

The deployment descriptor ejb-jar.xml is no longer created by default in the Developer Studio. According to the Java EE 5 specification, the information that was previously taken from the deployment descriptors can now be taken from the corresponding annotations in the source code.

End of the note.

You can modify the project facets after you have created the project. You can reach them using PropertiesProject Facets in the context menu of the project.

You can now add enterprise beans and helper components to the project.