1
votes

I am building an n-tier application for a school project.

From within my EJB module, I am creating an EJB with local and remote interfaces. The ejb methods that are implemented are supposed to call business logic (impls) that are already written, that exist within a separate tier, I believe.

The way the project is laid out:

`-- mainApp
|-- pom.xml
|-- driver
|   |-- pom.xml
|   |-- driverBO
|   |-- driverDAO
|   |-- driverBLImpl
|   |-- driverEJB
|   |   |-- pom.xml
|   |   `-- src
|   |       `-- main
|   |           |-- java
|   |           |   `-- driver
|   |           |       `-- ejb
|   |           `-- resources
|   |               `-- META-INF
|   |                   |-- beans.xml
|   |                   |-- persistence.xml
|   |                   |
|   |                   

Within the ejb folder, I have created an EJB that implements local and remote interfaces. I am trying to have those methods create instances of my blimpl objects, since that is where the calls to the backend DAOs happen to actually do the persisting. But, when I try to reference a blimpl object inside the ejb that I created, it doesn't know about those classes, since they are in separate modules, I assume. How can I reference these blimpl objects?

1

1 Answers

2
votes

You have to add them as a dependency to your driverEJB/pom.xml:

<dependency>
  <groupId>your-group-id</groupId>
  <artifactId>driverBLImpl</artifactId>
  <version>${project.version}</version>
</dependency>

Or something similar.