CDI 1.1 does not allow BeanManager.getBeans() to be called during AfterB...

...eanDiscovery event

Instead of calling BeanManager.getBeans() , we accumulate the beans we want to enhance during  ProcessBean event, then AfterBeanDiscovery we process the list of Beans