This is the general support for anything we want to be able to handle through CDI.
This work is already done on 6.0 branch, just need to port it to 5.3.