Domagoj Hamzic
Domagoj Hamzic

Reputation: 361

Cannot resolve reference Local ejb-ref. Communication between 2 EJB modules

I have 2 EJB modules and I want to make communication between them.

  1. EJB module has EB (Entity Bean) and SB (Stateless Sesssion Bean) (With Local Facades)
  2. 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.

Upvotes: 0

Views: 318

Answers (0)

Related Questions