Home

 

Make the JPA entities available to the EJB project

To make the JPA entities available to the EJBs, we add the RAD75JPA project to the RAD75EJBEAR enterprise application and create a dependency.

Right-click the RAD75EJBEAR project and select Java EE Æ Generate Deployment Descriptor Stub.

A META-INF folder with an application.xml file is created in the project.

Open the application.xml file.

In the editor, select the Design tab, and you can see the EJB module as part of the EAR (Figure | 4-10). Close the editor.

Figure 14-10 EAR deployment editor

Right-click the RAD75EJBEAR project and select Properties.

In the Properties dialog, select Java EE Module Dependencies, select the RAD75JPA module, and click OK (Figure | 4-11).

Figure 14-11 EAR module dependencies

Right-click the RAD75EJB project and select Properties. In the Properties dialog, select Java EE Module Dependencies, select the RAD75JPA.jar, and click OK (same as Figure | 4-11).
ibm.com/redbooks