Configuring EJB Jars as J2EE Modules
To configure EJB jars as a module, follow
one of the options below.
Option 1
- Import the EJB jar into an EJB project and then create project-based
J2EE module dependencies. To create the dependencies, right-click the
EAR and EJB projects and select Properties > J2EE Module Dependencies.
Option 2
If you don't want to create an EJB project, follow these instructions:
- If necessary, create an EAR project (File > New > Project >
J2EE > Enterprise Application Project) and a web service
project associated with the EAR.
- Import both EJB jar files into the EAR project underneath the EarContent directory.
- 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.