Back in the middle age, my company created his own IoC container and since then our application is running with it. But the day has come for us to switch to CDI/Weld. Instead of switching the whole thing to CDI (we honeslty can't...), we would like to do this bits by bits starting with our front-end JSF.
The idea is to leave some of the bean resolution to Weld (e.g controller) and some to our old IoC container (e.g services)
For instance:
@Named
@RequestSCoped
ControllerA {
@Inject
private ServiceB service:
}
ControllerA
should be managed by Weld, and ServiceB
should remain in our old IoC container. Though, Weld should know to resolve it.
So far, our best clue is most probably to use cdi extensions and play with lifecycle events. Any example, feedback or advice is appreciated.