Configuring EJB Jars as J2EE Modules

To configure EJB jars as a module, follow one of the options below.

Option 1

Option 2

If you don't want to create an EJB project, follow these instructions:

  1. If necessary, create an EAR project (File > New > Project > J2EE > Enterprise Application Project) and a web service project associated with the EAR.
  2. Import both EJB jar files into the EAR project underneath the EarContent directory.
  3. Edit the application.xml file in the EAR project to add module entries for both jars:

    First, right-click the EAR project and select Properties > J2EE Module Dependencies. Using the Add JARs button, map in both EJB jar files located under EarContent.

    Then, right-click the web service project and select Properties > J2EE Module Dependencies. Click on the entries for both EJB jar files to enable resolution of these jars from this module.

Still need help? Post a question on the Workshop newsgroup.