Thanks. The following gives me the same list of interfaces as advising:

@Match("*")
public static <T> T decorateEverything(Class<T> serviceInterface, T
delegate, String serviceId) {
        System.out.println(serviceInterface.getName());
        return delegate;
}

ClassNameLocator not being one of them.

I have fudged a fix by supplying my own
org.apache.tapestry5.ioc.internal.services.ClassNameLocatorImpl and
ensuring it's further up the classpath than Tapestry's but that's far
from perfect!

The Decorator documentation mentions:

> Note: It is not possible to decorate the services of the TapestryIOCModule.

The ClassNameLocator just happens to be an IOC internal class.

The Advice documentation mentions:

> Note that some services, especially those built-in to Tapestry IoC, are 
> marked as not subject to decoration, this applies to service advice as well 
> as service decoration.

The whole TapestryIOCModule is annotated with
@PreventServiceDecoration so that explains why I can't override it.

Might it be an idea to just annotate individual dangerous services
rather than a blanket ban on overriding all IOC services?

Steve.
--
Steve Eynon
www.bushmasters.co.uk
mobie: (+592) 6784236



2009/5/5 Thiago H. de Paula Figueiredo <thiag...@gmail.com>:
> Em Tue, 05 May 2009 19:23:14 -0300, Steve Eynon
> <steve.ey...@alienfactory.co.uk> escreveu:
>
>> How do I advise the ClassNameLocator service?
>
> Have you tried decoration instead of method advising? The resulting code
> would be very similar.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to