My configuration is: Wildfly 8.2.0, Weld
Is it possible to inject in bean and not in its interface in CDI ?
@Stateless
class Bean implements IBean {
...
It looks like you got an unclear answer in your prior question, and really all this question is is a follow up to that one.
Generally speaking, CDI allows you to inject both interface and impl for CDI managed beans. This is not the case for EJBs. When an EJB implements an interface, that becomes its business interface. Only the methods declared there are valid. Effectively, your Bean
class defines only how those methods work, and does not actually exist as a bean in your runtime.
So no, when using EJBs, you cannot inject the implementation, only the interface. If you really want to do this, I would move away from EJBs.