Skip to content

Instantly share code, notes, and snippets.

@os890
Last active December 16, 2015 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save os890/5427764 to your computer and use it in GitHub Desktop.
Save os890/5427764 to your computer and use it in GitHub Desktop.
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