It looks like I'm wrong.

Ultimately Registry.getService(Class) passes through to
Module.findServiceIdsForInterface() which ultimately finds all services
where:   serviceInterface.isAssignableFrom(def.getServiceInterface())

So it works the same as spring IOC which really surprised me.

So, as Chris was saying... you will have to disambiguate using one of the
methods mentioned on his link. Most likely @InjectService("session")

It still baffles me why this is only failing in the test. I can only assume
that this method is not being called when running the webapp?

https://github.com/apache/tapestry-5/blob/90766995f59048cb7f7d4cf042a21a9d728583db/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ModuleImpl.java#L158

Reply via email to