Buggy code:
class EJB3SubsystemAdd extends AbstractBoottimeAddStepHandler { private final EJBDefaultSecurityDomainProcessor defaultSecurityDomainDeploymentProcessor ; private final EJBDefaultPermissionsProcessor ejbDefaultPermissionsProcessor ; private final MissingMethodPermissionsDenyAccessMergingProcessor missingMethodPermissionsDenyAccessMergingProcessor ; EJB3SubsystemAdd ( final EJBDefaultSecurityDomainProcessor defaultSecurityDomainDeploymentProcessor , EJBDefaultPermissionsProcessor ejbDefaultPermissionsProcessor , final MissingMethodPermissionsDenyAccessMergingProcessor missingMethodPermissionsDenyAccessMergingProcessor ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performBoottime ( final OperationContext context , ModelNode operation , final ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { DelegatingStubFactoryFactory . setOverriddenDynamicFactory ( new DynamicStubFactoryFactory ( ) ) ; final RemoteObjectSubstitutionService substitutionService = new RemoteObjectSubstitutionService ( ) ; newControllers . add ( context . getServiceTarget ( ) . addService ( SERVICE_NAME , substitutionService ) . addDependency ( DeploymentRepository . SERVICE_NAME , DeploymentRepository . class , substitutionService . getDeploymentRepositoryInjectedValue ( ) ) . install ( ) ) ; RemoteObjectSubstitutionManager . setRemoteObjectSubstitution ( substitutionService ) ; EjbNamingContextSetup . setupEjbNamespace ( ) ; InitialContext . addUrlContextFactory ( "ejb" , new org . jboss . ejb . client . naming . ejb . ejbURLContextFactory ( ) ) ; final boolean appclient = ( context . getProcessType ( ) ) == ( ProcessType . APPLICATION_CLIENT ) ; final ModelNode defaultDistinctName = DEFAULT_DISTINCT_NAME . resolveModelAttribute ( context , model ) ; final DefaultDistinctNameService defaultDistinctNameService = new DefaultDistinctNameService ( ( defaultDistinctName . isDefined ( ) ? defaultDistinctName . asString ( ) : null ) ) ; newControllers . add ( context . getServiceTarget ( ) . addService ( DefaultDistinctNameService . SERVICE_NAME , defaultDistinctNameService ) . install ( ) ) ; final ModelNode defaultSecurityDomainModelNode = DEFAULT_SECURITY_DOMAIN . resolveModelAttribute ( context , model ) ; final String defaultSecurityDomain = ( defaultSecurityDomainModelNode . isDefined ( ) ) ? defaultSecurityDomainModelNode . asString ( ) : null ; this . defaultSecurityDomainDeploymentProcessor . setDefaultSecurityDomainName ( defaultSecurityDomain ) ; final ModelNode defaultMissingMethod = DEFAULT_MISSING_METHOD_PERMISSIONS_DENY_ACCESS . resolveModelAttribute ( context , model ) ; final boolean defaultMissingMethodValue = defaultMissingMethod . asBoolean ( ) ; this . missingMethodPermissionsDenyAccessMergingProcessor . setDenyAccessByDefault ( defaultMissingMethodValue ) ; final ModelNode disableDefaultPermissions = DISABLE_DEFAULT_EJB_PERMISSIONS . resolveModelAttribute ( context , model ) ; final boolean disableDefaultPermissionsValue = disableDefaultPermissions . asBoolean ( ) ; this . ejbDefaultPermissionsProcessor . setEnabled ( ( ! disableDefaultPermissionsValue ) ) ; context . addStep ( new AbstractDeploymentChainStep ( ) { @ Override protected void execute ( DeploymentProcessorTarget processorTarget ) { <START_BUG> processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_REGISTER_JBOSS_ALL_EJB , new org . jboss . as . server . deployment . jbossallxml . JBossAllXmlParserRegisteringProcessor < org . jboss . metadata . ejb . spec . EjbJarMetaData > ( EjbJarJBossAllParser . ROOT_ELEMENT , EjbJarJBossAllParser . ATTACHMENT_KEY , new EjbJarJBossAllParser ( ) ) ) ; <END_BUG> processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_EJB_DEFAULT_DISTINCT_NAME , new org . jboss . as . ejb3 . deployment . processors . EjbDefaultDistinctNameProcessor ( defaultDistinctNameService ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_EJB_CONTEXT_BINDING , new EjbContextJndiBindingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_EJB_DEPLOYMENT , new EjbJarParsingDeploymentUnitProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_CREATE_COMPONENT_DESCRIPTIONS , new AnnotatedEJBComponentDescriptionDeploymentUnitProcessor ( appclient ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_EJB_SESSION_BEAN_DD , new SessionBeanXmlDescriptorProcessor ( appclient ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_ANNOTATION_EJB , new EjbAnnotationProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_EJB_INJECTION_ANNOTATION , new EjbResourceInjectionAnnotationProcessor ( appclient ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_ENTITY_BEAN_CREATE_COMPONENT_DESCRIPTIONS , new EntityBeanComponentDescriptionFactory ( appclient ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_EJB_ASSEMBLY_DESC_DD , new AssemblyDescriptorProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_EJB_DEFAULT_SECURITY_DOMAIN , EJB3SubsystemAdd . this . defaultSecurityDomainDeploymentProcessor ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , DEPENDENCIES , DEPENDENCIES_EJB_PERMISSIONS , ejbDefaultPermissionsProcessor ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , DEPENDENCIES , DEPENDENCIES_EJB , new EjbDependencyDeploymentUnitProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_EJB_HOME_MERGE , new HomeViewMergingProcessor ( appclient ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_EJB_REF , new EjbRefProcessor ( appclient ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_EJB_BUSINESS_VIEW_ANNOTATION , new BusinessViewAnnotationProcessor ( appclient ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_EJB_ORB_BIND , new IIOPJndiBindingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_EJB_JNDI_BINDINGS , new EjbJndiBindingsDeploymentUnitProcessor ( appclient ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_EJB_CLIENT_METADATA , new EJBClientDescriptorMetaDataProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , INSTALL , INSTALL_EJB_CLIENT_CONTEXT , new EjbClientContextSetupProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , INSTALL , INSTALL_EJB_JACC_PROCESSING , new JaccEjbDeploymentProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , CLEANUP , CLEANUP_EJB , new EjbCleanUpProcessor ( ) ) ; if ( ! appclient ) { processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_EJB_TIMERSERVICE_BINDING , new TimerServiceJndiBindingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_EJB_APPLICATION_EXCEPTION_ANNOTATION , new ApplicationExceptionAnnotationProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_EJB_DD_INTERCEPTORS , new InterceptorClassDeploymentDescriptorProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_EJB_SECURITY_ROLE_REF_DD , new SecurityRoleRefDDProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_PASSIVATION_ANNOTATION , new PassivationAnnotationParsingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_EJB_IMPLICIT_NO_INTERFACE_VIEW , new ImplicitLocalViewProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_EJB_APPLICATION_EXCEPTIONS , new ApplicationExceptionMergingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_EJB_DD_INTERCEPTORS , new DeploymentDescriptorInterceptorBindingsProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_EJB_DD_METHOD_RESOLUTION , new DeploymentDescriptorMethodProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_EJB_TRANSACTION_MANAGEMENT , new TransactionManagementMergingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_EJB_CONCURRENCY_MANAGEMENT_MERGE , new ConcurrencyManagementMergingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_EJB_CONCURRENCY_MERGE , new EjbConcurrencyMergingProcessor ( ) ) ;

Fix:
processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_REGISTER_JBOSS_ALL_XML_PARSER , new org . jboss . as . server . deployment . jbossallxml . JBossAllXmlParserRegisteringProcessor < org . jboss . metadata . ejb . spec . EjbJarMetaData > ( EjbJarJBossAllParser . ROOT_ELEMENT , EjbJarJBossAllParser . ATTACHMENT_KEY , new EjbJarJBossAllParser ( ) ) ) ;