I am learning javaEE and I read somewhere about the main usage of cdi's was back then first in jsf-managed beans with annotations like @requestscope, @applicationscope, etc.. now in newer javaEE versions the cdi got available everywhere (even in ejb beans) so the question is, how do I have to annotate a class which shall be injected inside my local stateless ejb? I am asking this because the annotations like @RequestScope and all those are from jsf but I am not using jsf. Is @Default enough since its marked as default anyway? Is @Dependent better choice?
@Stateless
public class FooEjb{
@Inject Bar b;
}
// what annotation to put here?
public class Bar {
...
}