Like in the following example:
public interface CommandLineDieselEngineExhaustManipulatorService{
// command line services
}
public interface ClientDieselEngineExhaustManipulatorFacade{
// ui-client services
}
@Stateless
public class DieselEngineExhaustManipulatorImpl implements CommandLineDieselEngineExhaustManipulatorService, ClientDieselEngineExhausManipulatorFacade {
// Implementation of both interfaces
}
@Stateless
public class MyCdiManagedClass{
@Inject
private CommandLineDieselEngineExhaustManipulatorService cliService;
@Inject
private ClientDieselEngineExhausManipulatorFacade clientFacade;
// Whatever
}
I am not interested your opinion in whether or not I should favour the injection of plain Stateless EJBs (without interface) over Stateless EJBs injectable by its implementing interface.
I tried with JEE7 (CDI1) without success. I got the impression that EJB+CDI does not support that.
I wonder if it possible with JEE8?
I could not find any part in the CDI 2.0 specification, which seems to give a hint in the direction. I would highly appreciate if someone could point to the right place.
This Question did not answer the injection part either, might be outdated and the interesting link is dead: Can an EJB bean implement multiple interfaces?
Any ideas?