I must have miss expressed myself. I really want to advise all services. I used Match("*") to achieve that.
To realize what I wanted to do, I needed to inject a service in my advisor declaration in order to make it to work. This is exactly what it has been made for the LoggingAdvisor (see the official doc: http://tapestry.apache.org/tapestry5.1/tapestry-ioc/advice.html) @Match("*") public static void adviseLogging(LoggingAdvisor loggingAdvisor, Logger logger, MethodAdviceReciever reciever) { loggingAdvisor.addLoggingAdvice(logger, reciever); } But it seems that there is a problem with @Match("*"), because its not working when you inject a service (see stacktrace before) unless you use @Local. @Local limits the search for a service defined only in the current module. I'm *lucky* because the service I need (my LoggingAdvisor like) is defined in the same module. Right? :) On Fri, Mar 5, 2010 at 2:57 PM, Alfonso Quiroga <alfonsose...@gmail.com>wrote: > I don't understand this: > >I guess I'm lucky to only need a service defined in the same module. > > Why lucky? with @Match you can have 100 services, and only advise the > "portion" you need. You only need to have easy and well formed > services-ids. > Regard, Alfonso > > On Fri, Mar 5, 2010 at 10:54 AM, Robin Komiwes <odiss...@gmail.com> wrote: > > > I wasn't trying to inject the service I wanted to advise. ;) I'm making > > some > > kind of LoggingAdvisor. > > > > > > On Fri, Mar 5, 2010 at 2:43 PM, Thiago H. de Paula Figueiredo < > > thiag...@gmail.com> wrote: > > > > > On Fri, 05 Mar 2010 07:27:08 -0300, Robin Komiwes <odiss...@gmail.com> > > > wrote: > > > > > > Hi there, > > >> > > > > > > Hi! > > > > > > > > > Whenever I try to inject a service (cf following code), I've got > several > > >> errors : > > >> @Match("*") > > >> public static void adviseDummy(@Inject Dummy dummy, > > >> MethodAdviceReceiver > > >> receiver) > > >> { > > >> }; > > >> > > > > > > Why you're trying to inject the service you want do advise? You don't > > need > > > that. It seems to me you're mixing up decoration and advising. > > > > > > -- > > > Thiago H. de Paula Figueiredo > > > Independent Java, Apache Tapestry 5 and Hibernate consultant, > developer, > > > and instructor > > > Owner, software architect and developer, Ars Machina Tecnologia da > > > Informação Ltda. > > > http://www.arsmachina.com.br > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > > > >