You can advise any service defined in Tapestry Core but you can not
advise services defined in Tapestry IOC.
The TapestryIOCModule is annotated with @PreventServiceDecoration
which... does just that!
Steve.
2009/5/8 Igor Drobiazko :
> Hi Steve,
>
> that is not true. Of course you can override C
Hi Steve,
that is not true. Of course you can override ClasspathURLConverter as any
service in Tapestry.
On Wed, May 6, 2009 at 6:49 PM, Steve Eynon
wrote:
> Arr, yes, thanks Igor.
>
> The JavaDocs for ClasspathURLConverter even states it exists for OSGi
> (Eclipse) apps:
>
> > This is a hook f
Arr, yes, thanks Igor.
The JavaDocs for ClasspathURLConverter even states it exists for OSGi
(Eclipse) apps:
> This is a hook for supporting OSGi, allowing "bundleresource" and
> "bundleentry" protocols to be converted to "jar:" or "file:".
The default implementation currently returns the URLs
Hi Steve,
the problem is the protocol bundleresource.
You should override ClasspathURLConverter which is used by ClassNameLocator.
This service was introduced to be able to handle URLs which are not common
in Java.
I provide for example my own implementition of this service in an OSGi
environment,
Em Wed, 06 May 2009 00:33:34 -0300, Steve Eynon
escreveu:
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 servi
Thanks. The following gives me the same list of interfaces as advising:
@Match("*")
public static T decorateEverything(Class serviceInterface, T
delegate, String serviceId) {
System.out.println(serviceInterface.getName());
return delegate;
}
ClassNameLocator not being one of them
Em Tue, 05 May 2009 19:23:14 -0300, Steve Eynon
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
How do I advise the ClassNameLocator service?
If I add the following advice method to my AppModule ...
@Match("*")
public static void adviseEverything(MethodAdviceReceiver receiver) {
System.out.println(receiver.getInterface());
}
Only the following interfaces are advised ...
interface