I have a simple project built with Eclipse 3.4 (aka IBM RAD) on WebSphere 7.
I have an EAR project, an EJB project, and a JPA project in my workspace.
SHORT VERSION:
An ejb in my EJB project is referencing an EJB in my JPA project, but it gives me an EJBNotFoundException error.
What is the “correct” way of putting an EJB in my JPA project?
UPDATE
A co-worker tells me the EJBs should be in the EJB project, not the JPA project. Is that all I did wrong? Would like a second opinion on this, thanks.
LONG VERSION:
In the JPA project I have my entity/domain objects (ex. Workflow.java) and I have a DAO (ex. WorkflowDAO.java) which is annotated as an EJB with @Stateless.
In the EJB project I have an ejb (ex. WorkflowService.java) which is annotated as an @EJB with @Stateless.
WorkflowService.java references a WorkflowDAO like so:
@Stateless
public class WorkflowService /*...*/
@EJB
private WorkflowDAO workflowDAO; /*...*
The problem is, when I deploy to the server I get the following error:
com.ibm.ejs.container.EJBNotFoundException, EJB with interface test.WorkflowDAO not present in application testEAR.
Any help greatly appreciated, thanks!
Rob
FYI, I have dug deeper and learned more. I added a new question that decribes my problem more specifically:
why can't my EAR project see the annotated EJBs and Entities in my JPA project?