ejb3/src/main/java/org/jboss/as/ejb3/component/EJBComponentDescription.java
protected void addServerSecurityManagerDependency() {
        getConfigurators().add(new ComponentConfigurator() {
            @Override
            public void configure(final DeploymentPhaseContext context, final ComponentDescription description, final ComponentConfiguration componentConfiguration) throws DeploymentUnitProcessingException {
                if (! ((EJBComponentDescription) description).isSecurityDomainKnown()) {
                    final DeploymentUnit deploymentUnit = context.getDeploymentUnit();
                    final CapabilityServiceSupport support = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.CAPABILITY_SERVICE_SUPPORT);
                    componentConfiguration.getCreateDependencies().add(new DependencyConfigurator<EJBComponentCreateService>() {
                        @Override
                        public void configureDependency(final ServiceBuilder<?> serviceBuilder, final EJBComponentCreateService ejbComponentCreateService) throws DeploymentUnitProcessingException {
                            serviceBuilder.addDependency(support.getCapabilityServiceName("org.wildfly.legacy-security.server-security-manager"), ServerSecurityManager.class, ejbComponentCreateService.getServerSecurityManagerInjector());
                        }
                    });
                }
            }
        });
    }
protected void addServerSecurityManagerDependency() {
        getConfigurators().add(new ComponentConfigurator() {
            @Override
            public void configure(final DeploymentPhaseContext context, final ComponentDescription description, final ComponentConfiguration componentConfiguration) throws DeploymentUnitProcessingException {
                if (! ((EJBComponentDescription) description).isSecurityDomainKnown()) {
                    final DeploymentUnit deploymentUnit = context.getDeploymentUnit();
                    final CapabilityServiceSupport support = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.CAPABILITY_SERVICE_SUPPORT);
                    componentConfiguration.getCreateDependencies().add(new DependencyConfigurator<EJBComponentCreateService>() {
                        @Override
                        public void configureDependency(final ServiceBuilder<?> serviceBuilder, final EJBComponentCreateService ejbComponentCreateService) throws DeploymentUnitProcessingException {
                            serviceBuilder.addDependency(support.getCapabilityServiceName("org.wildfly.legacy-security.server-security-manager"), ServerSecurityManager.class, ejbComponentCreateService.getServerSecurityManagerInjector());
                        }
                    });
                }
            }
        });
    }
protected void addServerSecurityManagerDependency ( ) { getConfigurators ( ) . add ( new ComponentConfigurator ( ) { @ Override public void configure ( final DeploymentPhaseContext context , final ComponentDescription description , final ComponentConfiguration componentConfiguration ) throws DeploymentUnitProcessingException { if ( ! ( ( EJBComponentDescription ) description ) . isSecurityDomainKnown ( ) ) { final DeploymentUnit deploymentUnit = context . getDeploymentUnit ( ) ; final CapabilityServiceSupport support = deploymentUnit . getAttachment ( org . jboss . as . server . deployment . Attachments . CAPABILITY_SERVICE_SUPPORT ) ; componentConfiguration . getCreateDependencies ( ) . add ( new DependencyConfigurator < EJBComponentCreateService > ( ) { @ Override public void configureDependency ( final ServiceBuilder < ? > serviceBuilder , final EJBComponentCreateService ejbComponentCreateService ) throws DeploymentUnitProcessingException { serviceBuilder . addDependency ( support . getCapabilityServiceName ( "org.wildfly.legacy-security.server-security-manager" ) , ServerSecurityManager . class , ejbComponentCreateService . getServerSecurityManagerInjector ( ) ) ; } } ) ; } } } ) ; }
Sets up a {@link ComponentConfigurator} which then sets up the dependency on the ServerSecurityManager service for the {@link EJBComponentCreateService}
Sets up a {