How to create services without "static bind(ServiceBinder)" and
"buildMethod" like this:
AppModule {
void contributeIdContainer(Configuration<String> config) {
config.add("someId-1");
config.add("someId-2");
}
}
InternalModule {
...
ids = idContainer.getAll();
for (String id : ids) {
// build() is imaginary method for create service
build(MyService.class,
objectLocator.getService(MyServiceFactory.class).createBy(id)
.withId(id)
.scope(PERTHREAD);
}
...
}
SomeServiceImpl {
public SomeServiceImpl(
@InjectService("someId-1") MyService some1,
@InjectService("someId-2") MyService some2
) {...}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org