@Override
 public synchronized void start(final StartContext context) throws StartException {
   super.start(context);
   ApplicationSecurityDomain applicationSecurityDomain = getApplicationSecurityDomain();
   Function<String, Registration> securityFunction =
       applicationSecurityDomain != null ? applicationSecurityDomain.getSecurityFunction() : null;
   if (securityFunction != null) {
     final DeploymentUnit deploymentUnit = getDeploymentUnitInjector().getValue();
     final String deploymentName =
         deploymentUnit.getParent() == null
             ? deploymentUnit.getName()
             : deploymentUnit.getParent().getName() + "." + deploymentUnit.getName();
     registration = securityFunction.apply(deploymentName);
   }
 }
 public SecurityDomain getSecurityDomain() {
   ApplicationSecurityDomain applicationSecurityDomain = getApplicationSecurityDomain();
   return applicationSecurityDomain != null ? applicationSecurityDomain.getSecurityDomain() : null;
 }