I had this code
@Local
interface IRepo
{
}
@Stateless
class Repo implements IRepo
{
}
class WebS
{
@EJB private IRepo repo;
}
And everything worked fine.
But now I delete the interface IRepoand do
@Stateless
class Repo {
}
class WebS
{
@EJB private Repo repo;
}
and JNDI lookup is not performed.
could not resolve global JNDI name for @EJB for container WebS ...
Can I inject dependencies without an interface?
source
share