I'm injecting the service in the module class just to be able to call it in the registry-contribution method to test the service once the applications starts up. But actually in production i'm doing the same, to call some of my services methods to initialize them in a way, but since it looks weird how do you guys think I should initialize a service ? is the eagerLoad() method while binding the only way ?
Makes me think, when I was first learning about tapestry I had many things done in the wrong way or even not-so-right way and the application continued to grow based on these wrong concepts. On Thu, Jun 14, 2012 at 8:07 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Thu, 14 Jun 2012 15:01:49 -0300, Steve Eynon < > steve.ey...@alienfactory.co.**uk <steve.ey...@alienfactory.co.uk>> wrote: > > My mistake, the @Inject in the My class needs to be a >> >> org.apache.tapestry5.ioc.**annotations.Inject; >> or >> org.apache.tapestry5.ioc.**annotations.InjectResource; >> >> Probably as (already stated - I think), the T5 @Inject uses a >> MasterObjectProvider whereas the javax @Inject just looks up Services >> - which the Logger isn't... ??? >> > > I guess that's because the javax.inject.Inject annotation has a very > specific definition of what can be injected with it and Tapestry-IoC > resources (aka anything that can be injected that isn't a service) don't > fit in this definition. > > > -- > Thiago H. de Paula Figueiredo > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@tapestry.**apache.org<users-unsubscr...@tapestry.apache.org> > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- *Regards,* *Muhammad Gelbana Java Developer*