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