Buggy code:
class EJB3SubsystemAdd extends AbstractBoottimeAddStepHandler { static final EJB3SubsystemAdd INSTANCE = new EJB3SubsystemAdd ( ) ; private static final Logger logger = Logger . getLogger ( EJB3SubsystemAdd . class ) ; private EJB3SubsystemAdd ( ) { } protected void populateModel ( ModelNode operation , ModelNode model ) { } protected void performBoottime ( final OperationContext context , ModelNode operation , final ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { EjbNamingContextSetup . setupEjbNamespace ( ) ; InitialContext . addUrlContextFactory ( "ejb" , new org . jboss . ejb . client . naming . ejb . ejbURLContextFactory ( ) ) ; final boolean appclient = ( model . hasDefined ( EJB3SubsystemModel . APPCLIENT ) ) && ( model . get ( EJB3SubsystemModel . APPCLIENT ) . asBoolean ( ) ) ; final DefaultAccessTimeoutService statefulTimeout = new DefaultAccessTimeoutService ( DEFAULT_STATEFUL_ACCESS_TIMEOUT . validateResolvedOperation ( model ) . asLong ( ) ) ; newControllers . add ( context . getServiceTarget ( ) . addService ( STATEFUL_SERVICE_NAME , statefulTimeout ) . install ( ) ) ; final DefaultAccessTimeoutService singletonTimeout = new DefaultAccessTimeoutService ( DEFAULT_SINGLETON_ACCESS_TIMEOUT . validateResolvedOperation ( model ) . asLong ( ) ) ; newControllers . add ( context . getServiceTarget ( ) . addService ( SINGLETON_SERVICE_NAME , singletonTimeout ) . install ( ) ) ; context . addStep ( new AbstractDeploymentChainStep ( ) { protected void execute ( DeploymentProcessorTarget processorTarget ) { processorTarget . addDeploymentProcessor ( PARSE , PARSE_EJB_DEPLOYMENT , new EjbJarParsingDeploymentUnitProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( PARSE , PARSE_SESSION_BEAN_CREATE_COMPONENT_DESCRIPTIONS , new SessionBeanComponentDescriptionFactory ( appclient ) ) ; processorTarget . addDeploymentProcessor ( PARSE , PARSE_EJB_SESSION_BEAN_DD , new SessionBeanXmlDescriptorProcessor ( appclient ) ) ; processorTarget . addDeploymentProcessor ( PARSE , PARSE_ANNOTATION_EJB , new EjbAnnotationProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( PARSE , PARSE_EJB_INJECTION_ANNOTATION , new EjbResourceInjectionAnnotationProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( DEPENDENCIES , DEPENDENCIES_EJB , new EjbDependencyDeploymentUnitProcessor ( ) ) ; <START_BUG> processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_HOME_MERGE , new HomeViewMergingProcessor ( ) ) ; <END_BUG> processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_REF , new EjbRefProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_CLIENT_CONTEXT_SETUP , new EjbClientContextSetupProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_BUSINESS_VIEW_ANNOTATION , new BusinessViewAnnotationProcessor ( appclient ) ) ; processorTarget . addDeploymentProcessor ( INSTALL , INSTALL_RESOLVE_EJB_INJECTIONS , new EjbInjectionResolutionProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( CLEANUP , CLEANUP_EJB , new EjbCleanUpProcessor ( ) ) ; if ( ! appclient ) { processorTarget . addDeploymentProcessor ( PARSE , PARSE_EJB_CONTEXT_BINDING , new EjbContextJndiBindingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( PARSE , PARSE_EJB_TIMERSERVICE_BINDING , new TimerServiceJndiBindingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( PARSE , PARSE_EJB_APPLICATION_EXCEPTION_ANNOTATION , new ApplicationExceptionAnnotationProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( PARSE , PARSE_EJB_DD_INTERCEPTORS , new InterceptorClassDeploymentDescriptorProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( PARSE , PARSE_EJB_ASSEMBLY_DESC_DD , new AssemblyDescriptorProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( PARSE , PARSE_EJB_SECURITY_ROLE_REF_DD , new SecurityRoleRefDDProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( PARSE , PARSE_EJB_REMOTE_CLIENT_CONTEXT , new EjbClientContextParsingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( PARSE , PARSE_MDB_CREATE_COMPONENT_DESCRIPTIONS , new MessageDrivenComponentDescriptionFactory ( ) ) ; processorTarget . addDeploymentProcessor ( PARSE , PARSE_ENTITY_BEAN_CREATE_COMPONENT_DESCRIPTIONS , new EntityBeanComponentDescriptionFactory ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_IMPLICIT_NO_INTERFACE_VIEW , new ImplicitLocalViewProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_JNDI_BINDINGS , new EjbJndiBindingsDeploymentUnitProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_MODULE_CONFIGURATION , new EjbJarConfigurationProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_DD_INTERCEPTORS , new DeploymentDescriptorInterceptorBindingsProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_DD_METHOD_RESOLUTION , new DeploymentDescriptorMethodProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_TRANSACTION_MANAGEMENT , new TransactionManagementMergingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_CONCURRENCY_MANAGEMENT_MERGE , new ConcurrencyManagementMergingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_CONCURRENCY_MERGE , new org . jboss . as . ejb3 . deployment . processors . merging . EjbConcurrencyMergingProcessor ( singletonTimeout , statefulTimeout ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_TX_ATTR_MERGE , new TransactionAttributeMergingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_RUN_AS_MERGE , new RunAsMergingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_RESOURCE_ADAPTER_MERGE , new ResourceAdaptorMergingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_REMOVE_METHOD , new RemoveMethodMergingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_STARTUP_MERGE , new StartupMergingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_SECURITY_DOMAIN , new SecurityDomainMergingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_ROLES , new DeclareRolesMergingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_METHOD_PERMISSIONS , new MethodPermissionsMergingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_STATEFUL_TIMEOUT , new StatefulTimeoutMergingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_SESSION_SYNCHRONIZATION , new SessionSynchronizationMergingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_INIT_METHOD , new InitMethodMergingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_LOCAL_HOME , new SessionBeanHomeProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_ORB_BIND , new ORBJndiBindingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( INSTALL , INSTALL_DEPENDS_ON_ANNOTATION , new EjbDependsOnMergingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( INSTALL , INSTALL_DEPLOYMENT_REPOSITORY , new DeploymentRepositoryProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( INSTALL , INSTALL_EJB_MANAGEMENT_RESOURCES , new EjbManagementDeploymentUnitProcessor ( ) ) ; } } } , RUNTIME ) ; if ( model . hasDefined ( EJB3SubsystemModel . DEFAULT_MDB_INSTANCE_POOL ) ) { MDB_POOL . updatePoolService ( context , model , newControllers ) ; } if ( model . hasDefined ( EJB3SubsystemModel . DEFAULT_SLSB_INSTANCE_POOL ) ) { SLSB_POOL . updatePoolService ( context , model , newControllers ) ; } if ( model . hasDefined ( EJB3SubsystemModel . DEFAULT_RESOURCE_ADAPTER_NAME ) ) { DefaultResourceAdapterWriteHandler . INSTANCE . updateDefaultAdapterService ( context , model , newControllers ) ; } final ServiceTarget serviceTarget = context . getServiceTarget ( ) ;

Fix:
processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_EJB_HOME_MERGE , new HomeViewMergingProcessor ( appclient ) ) ;