Some more oddities, I looks as if I'm able to get past this issue if I use @InjectService as Chris described, however I noticed if I try to do any saves in the GenericDAO, it fails. I'm also running into problems where my services are looking for Tapestry services but can't find them. Example PageRenderLinkSource. It's strange everything works while not in test, I'm wondering if I'm missing something. Should I be using a Tapestry module too or no?
public GenericDAOImpl(@InjectService("session") Session session) { this.session = session; } On Wed, Sep 10, 2014 at 9:57 AM, Lance Java <lance.j...@googlemail.com> wrote: > 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 > -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York