FWIW, simply making isAlternative() return true enables it for OWB.
That does not seem to be legal. And yes, I've just verified that Weld does not allow to "override" built-in beans such as Provider. I've also created a spec clarification issue: https://issues.jboss.org/browse/CDI-712. |