Last active
December 16, 2015 11:29
-
-
Save os890/5427764 to your computer and use it in GitHub Desktop.
veto beans for weld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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