Right now you can only inject repositories and external beans, not other services.
http://www.fornax-platform.org/tracker/browse/CSC-189However, the workaround is easy (but ugly).
Add a method that delegates to the service. It can be protected to avoid visibility in public api.
Service PlanetService {
protected injectionDummy => @AnotherService.dummy;
String sayHello(String planetName) throws PlanetNotFoundException;
protected findByExample => PlanetRepository.findByExample;
@Planet getPlanet(String planetName) throws PlanetNotFoundException;
}
Service AnotherService {
void dummy();
}
/Patrik
Bjoern_G wrote:
I can't get Services from other Modules injected, any ideas what could be wrong? The Service I want to inject is not generated into the ServiceBaseImpl, and it also doesn't show up in the Services-....xml (so the problem is not that I should provide the setter myself, as for "external" services).
I have tried it several times with different services.
using > @ServiceName as usual.