I had an issue whith interceptor activation for CDI beans. I investigated the issue and found that GlassFish associates wrong beans.xml resource with bean deployment archives. This causes Weld to think that interceptors for BDA are not enabled because provided beans.xml has no interceptors enabled (although beans.xml in BDA has them enabled).
The cause of this is the way GlassFish constructs URL for beans.xml which is then passed to org.jboss.weld.bootstrap.WeldBootstrap.
Method handleEntry in class org.glassfish.weld.BeanDeploymentArchiveImpl constructs the URL as follows:
In case of web application with multiple bean archives located in WEB-INF/lib it loads the same beans.xml for all bean archives (the first one found). That's beacuse there is one class loader for whole web application. There are no separate classloaders for specific archives in WEB-INF/lib. The entry in all cases is "META-INF/beans.xml", so the classloader always loads the same resource.
I attached a test case which demonstrates this bahaviour.
Commenting out the fragment
makes it pass.