security/subsystem/src/main/java/org/jboss/as/security/deployment/JaccEarDeploymentProcessor.java
@Override
    public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        AbstractSecurityDeployer<?> deployer = null;
        if (DeploymentTypeMarker.isType(DeploymentType.EAR, deploymentUnit)) {
            deployer = new EarSecurityDeployer();
            JaccService<?> service = deployer.deploy(deploymentUnit);
            if (service != null) {
                final ServiceName jaccServiceName = deploymentUnit.getServiceName().append(JaccService.SERVICE_NAME);
                final ServiceTarget serviceTarget = phaseContext.getServiceTarget();
                ServiceBuilder<?> builder = serviceTarget.addService(jaccServiceName, service);
                if (deploymentUnit.getParent() != null) {
                    // add dependency to parent policy
                    final DeploymentUnit parentDU = deploymentUnit.getParent();
                    builder.addDependency(parentDU.getServiceName().append(JaccService.SERVICE_NAME), PolicyConfiguration.class,
                            service.getParentPolicyInjector());
                }
                builder.setInitialMode(Mode.ACTIVE).install();
            }
        }
    }
@Override
    public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        AbstractSecurityDeployer<?> deployer = null;
        if (DeploymentTypeMarker.isType(DeploymentType.EAR, deploymentUnit)) {
            deployer = new EarSecurityDeployer();
            JaccService<?> service = deployer.deploy(deploymentUnit);
            if (service != null) {
                final ServiceName jaccServiceName = deploymentUnit.getServiceName().append(JaccService.SERVICE_NAME);
                final ServiceTarget serviceTarget = phaseContext.getServiceTarget();
                ServiceBuilder<?> builder = serviceTarget.addService(jaccServiceName, service);
                if (deploymentUnit.getParent() != null) {
                    // add dependency to parent policy
                    final DeploymentUnit parentDU = deploymentUnit.getParent();
                    builder.addDependency(parentDU.getServiceName().append(JaccService.SERVICE_NAME), PolicyConfiguration.class,
                            service.getParentPolicyInjector());
                }
                builder.setInitialMode(Mode.ACTIVE).install();
            }
        }
    }
{@inheritDoc}