Buggy code:
public class ManagedBeanAnnotationProcessor implements DeploymentUnitProcessor { static final DotName MANAGED_BEAN_ANNOTATION_NAME = DotName . createSimple ( ManagedBean . class . getName ( ) ) ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final EEResourceReferenceProcessorRegistry registry = deploymentUnit . getAttachment ( RESOURCE_REFERENCE_PROCESSOR_REGISTRY ) ; final EEModuleDescription moduleDescription = deploymentUnit . getAttachment ( EE_MODULE_DESCRIPTION ) ; final CompositeIndex compositeIndex = deploymentUnit . getAttachment ( COMPOSITE_ANNOTATION_INDEX ) ; if ( compositeIndex == null ) { return ; } final List < AnnotationInstance > instances = compositeIndex . getAnnotations ( ManagedBeanAnnotationProcessor . MANAGED_BEAN_ANNOTATION_NAME ) ; if ( ( instances == null ) || ( instances . isEmpty ( ) ) ) { return ; } for ( AnnotationInstance instance : instances ) { AnnotationTarget target = instance . target ( ) ; if ( ! ( target instanceof ClassInfo ) ) { throw EeMessages . MESSAGES . classOnlyAnnotation ( "@ManagedBean" , target ) ; } final ClassInfo classInfo = ( ( ClassInfo ) ( target ) ) ; if ( ! ( ManagedBeanAnnotationProcessor . assertManagedBeanClassValidity ( classInfo ) ) ) { continue ; } final String beanClassName = classInfo . name ( ) . toString ( ) ; final AnnotationValue nameValue = instance . value ( ) ; final String beanName = ( ( nameValue == null ) || ( nameValue . asString ( ) . isEmpty ( ) ) ) ? beanClassName : nameValue . asString ( ) ; final ManagedBeanComponentDescription componentDescription = new ManagedBeanComponentDescription ( beanName , beanClassName , moduleDescription , deploymentUnit . getServiceName ( ) ) ; ViewDescription viewDescription = new ViewDescription ( componentDescription , beanClassName ) ; viewDescription . getConfigurators ( ) . addFirst ( new ViewConfigurator ( ) { public void configure ( final DeploymentPhaseContext context , final ComponentConfiguration componentConfiguration , final ViewDescription description , final ViewConfiguration configuration ) throws DeploymentUnitProcessingException { final Object contextKey = new Object ( ) ; configuration . addClientPostConstructInterceptor ( new ManagedBeanCreateInterceptorFactory ( contextKey ) , INSTANCE_CREATE ) ; final ManagedBeanAssociatingInterceptorFactory associatingInterceptorFactory = new ManagedBeanAssociatingInterceptorFactory ( contextKey ) ; configuration . addClientInterceptor ( associatingInterceptorFactory , ASSOCIATING_INTERCEPTOR ) ; configuration . addClientPreDestroyInterceptor ( new ManagedBeanDestroyInterceptorFactory ( contextKey ) , INSTANCE_DESTROY ) ; final ClassLoader classLoader = componentConfiguration . getModuleClassLoader ( ) ; configuration . addViewInterceptor ( PrivilegedInterceptor . getFactory ( ) , PRIVILEGED_INTERCEPTOR ) ; <START_BUG> configuration . addViewInterceptor ( AccessCheckingInterceptor . getFactory ( ) , PRIVILEGED_INTERCEPTOR ) ; <END_BUG> configuration . addViewInterceptor ( new org . jboss . invocation . ImmediateInterceptorFactory ( new ContextClassLoaderInterceptor ( classLoader ) ) , TCCL_INTERCEPTOR ) ; } } ) ; viewDescription . getBindingNames ( ) . addAll ( Arrays . asList ( ( "java:module//" + beanName ) , ( ( ( "java:app//" + ( moduleDescription . getModuleName ( ) ) ) + "//" ) + beanName ) ) ) ; componentDescription . getViews ( ) . add ( viewDescription ) ; moduleDescription . addComponent ( componentDescription ) ; registry . registerResourceReferenceProcessor ( new ManagedBeanResourceReferenceProcessor ( beanClassName ) ) ; } } public void undeploy ( DeploymentUnit context ) { } private static boolean assertManagedBeanClassValidity ( final ClassInfo managedBeanClass ) { } }

Fix:
configuration . addViewInterceptor ( AccessCheckingInterceptor . getFactory ( ) , CHECKING_INTERCEPTOR ) ;