Closed jakub-bochenski closed 8 years ago
We had actually been discussing something similar for vertx-hk2
which we use with Jersey.
I have pushed a branch feature/parent-child-injector.
Is this similar to what you had in mind?
The issue is how to initialize the parent injector on the factory since it doesn't run on the vert.x event loop with a Context
so the JSON config is not available. I have left it so you can programmatically set the injector. Thoughts?
Looks promising, though I need some time to process your last remark about setting the injector.
I think the use case is similar to one described here: https://stackoverflow.com/a/12774246/1237617
This should allow one to have global modules that will only be applied once per Vertx creation and child modules that will be applied per each verticle.
If you think it's a valid improvement I'll be glad to send a PR quite soon as we have a real use case for it