Say I have the following EJB (using ejb3):
@Stateless(name="Queries")
@Remote(Queries.class)
@Local(Queries.class)
public final class QueriesEJB implements Queries {
...
}
The class is available through both a local and a remote interface.
How can I inject the local interface for this EJB in another part of the app?
Specifically, I'm not sure how to create an @EJB annotation that selects the local interface. For example, is the following sufficient?
@EJB(name="Queries") private Queries queries;
In particular I want to avoid creating separate local and remote interfaces simply for the purpose of distinguishing via @EJB's 'beanInterface' property.