hi Julien,

the default SymbolSource is qualified by the @Builtin marker...
eg.:

... build(@Builtin SymbolSource t5SymbolSource)....

are you trying to replace the whole SymbolSource service?

g,
kris




Julien Giovaresco <[EMAIL PROTECTED]> 
15.07.2008 17:05
Bitte antworten an
"Tapestry users" <[email protected]>


An
Tapestry users <[email protected]>
Kopie

Thema
Re: [T5] Create a new SymbolSource service






Kristian,
thanks for your reply.

I've already qualified my new implementation of the interface 
org.apache.tapestry5.ioc.services.SymbolSource like this :

/p_Binder.bind(SymbolSource.class, 
FwlSymbolSource.class).withId("FwlSymbolSource");/

However the "default" implementation of this interface is defined in 
TapestryIOCModule class without a service Id.

Regards,

Julien

Kristian Marinkovic a écrit :
> hi Julien,
>
> if you want to define two (or more) services with the same
> interface you have to qualify them. 
>
> if you use the binder method:
> public static void bind(ServiceBinder binder)
> {
>   binder.bind(SymbolSource.class, MySymbolSourceImpl.class
> ).withId("mySymbolSource");
> ...
>
> or as builder method
>
> public SymbolSource buildMySymbolSource(...) {}
>
> everytime you want to inject your service you'll have to 
> qualify it as well:
>
> public Interface build(@InjectService("mySymbolsource") SymbolSource 
> mySymbolSource)
> {}
>
> i hope this helps.
>
> g,
> kris
>
>
>
>
>
> Julien Giovaresco <[EMAIL PROTECTED]> 
> 15.07.2008 16:26
> Bitte antworten an
> "Tapestry users" <[email protected]>
>
>
> An
> [email protected]
> Kopie
>
> Thema
> [T5] Create a new SymbolSource service
>
>
>
>
>
>
> Hi everyone,
>
> I'd like to create a new service implementing the interface 
> *org.apache.tapestry5.ioc.services.SymbolSource* to remove the cache 
> functionnality of the Tapestry service *SymbolSourceImpl*.
> However I can't create such a service because I've the following 
> exception :
> /Service interface org.apache.tapestry5.ioc.services.SymbolSource is 
> matched by 2 services: FwlSymbolSource, SymbolSource.  Automatic 
> dependency resolution requires that exactly one service implement the 
> interface./
>
> Can I prevent this problem ?
>
> Regards,
>
> Julien
>
>
> 

Reply via email to