I am using wildfly 10.1.0 and JavaEE 7
I've got this interface:
public interface TestEjb {
String something();
}
and this Ejb class implementing it:
@LocalBean
@Stateless
public class TestEjbImpl implements TestEjb {
@Override
public String something() {
return "Hello world";
}
}
When I am injecting it to my @Path annotated jax-rs class using
@Inject
private TestEjb testEjb;
It gives an error saying "WELD-001408: Unsatisfied dependencies for type TestEjb with qualifiers @Default"
But when I inject it like
@Inject
private TestEjbImpl testEjb;
it works fine. And which is surprising both ways work with no problems in jboss-eap-6.4. But why?