I have 2 EJB modules and I want to make communication between them.
- EJB module has EB (Entity Bean) and SB (Stateless Sesssion Bean) (With Local Facades)
- EJB module has a simple public class Test which uses local facade (MyairportsFacadeLocal) from the first module.
public class Test {
@EJB
MyairportsFacadeLocal myafl;
public Test(){
int rowsCount=myafl.count();
}
}
When I run the code above, I get an error (title). Unsuccessful deployment.
Also, I tried with @Inject. With that annotation, app starts successfully but myafl is null... Everything works fine when @EJB is inside of the bean, but I don't know how to communicate with first EJB module when I need communication outside of the bean.