t5: building injected objects

2010-12-29 Thread Sergio Esteves
Hi all, If I have a class with this: �...@inject @OfflineJob engine;» and my project class: «OfflineJob buildFoo(@InjectService(EjbContext) Context ejbContext) throws NamingException { ... } OfflineJob buildBar(@InjectService(EjbContext) Context ejbContext) throws NamingException { ... }»

Re: t5: building injected objects

2010-12-29 Thread Robert Zeigler
Both could be built, but you'll get an exception at runtime because Tapestry can't disambiguate which service you want injected. You would need to either specify the service id of (foo or bar) of the service you want injected, or else mark the two services in some way and use said marker

Re: t5: building injected objects

2010-12-29 Thread Sergio Esteves
The service id is the word that appears after the build? Like, if I do this: «OfflineJob buildFoo(@InjectService(EjbContext) Context ejbContext) throws NamingException { ... } OfflineJob buildBar(@InjectService(EjbContext) Context ejbContext) throws NamingException { ... }» Will I be able to