Hi,

 

I want to override a service, lets say SomeService, with my own implementation, 
lets say SomeServiceMyImpl.

In my module class I do it like this:

…

public static void bind(ServiceBinder binder)

{

    binder.bind(SomeService.class, 
SomeServiceMyImpl.class).withId("SomeServiceMyImpl");

}

 

public static void contributeServiceOverride (

MappedConfiguration<Class, Object> configuration,

       @InjectService ("SomeServiceMyImpl") SomeService someServiceMyImpl)

{

       configuration.add(ComponentClassResolver.class, someServiceMyImpl);

}

…

The problem is that contributions for SomeService (in the format of 
contributeSomeService(...)) are not gathered and injected into constructor of 
SomeServiceMyImpl.

Does anybody know how to achieve this?

 

Regards

Keio Kraaner

Reply via email to