Instantly share code, notes, and snippets.

Embed
What would you like to do?
veto beans for weld
public class WeldFilter implements Extension
{
public void vetoForWeld(@Observes ProcessAnnotatedType processAnnotatedType, BeanManager beanManager)
{
if (!beanManager.getClass().getName().contains("org.apache."))
{
processAnnotatedType.veto();
}
}
}
//activate WeldFilter to replace weld with owb. only owb will use your beans.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment