My code:
@Path("/actors")
public class MainController {
  @EJB
  private ActorDaoLocal actorDao;  
}
@Local
public interface ActorDaoLocal { 
  //some stuff here
}
@Stateless
public class ActorDao implements ActorDaoLocal {
  @PersistenceContext
  private EntityManager em ; 
  //some stuff here 
}
@ManagedBean(name = "ActorBean")
@ApplicationScoped
public class ActorBean {
  @EJB
  private ActorDaoLocal usersDao;
}
When I am trying to use actorDao in MainController class, it is null. Why and how to fix it? I also tried to use ActorBean object, but it's also null. 
 
    