Search in sources :

Example 1 with ApplicationSecurityDomain

use of org.jboss.as.ejb3.subsystem.ApplicationSecurityDomainService.ApplicationSecurityDomain in project wildfly by wildfly.

the class EJBSecurityDomainService method start.

@Override
public synchronized void start(StartContext context) throws StartException {
    ApplicationSecurityDomain applicationSecurityDomain = getApplicationSecurityDomain();
    BiFunction<String, ClassLoader, Registration> securityFunction = applicationSecurityDomain != null ? applicationSecurityDomain.getSecurityFunction() : null;
    if (securityFunction != null) {
        final String deploymentName = deploymentUnit.getParent() == null ? deploymentUnit.getName() : deploymentUnit.getParent().getName() + "." + deploymentUnit.getName();
        final Module module = deploymentUnit.getAttachment(Attachments.MODULE);
        final ClassLoader classLoader = module.getClassLoader();
        registration = securityFunction.apply(deploymentName, classLoader);
    }
}
Also used : Registration(org.jboss.as.ejb3.subsystem.ApplicationSecurityDomainService.Registration) Module(org.jboss.modules.Module) ApplicationSecurityDomain(org.jboss.as.ejb3.subsystem.ApplicationSecurityDomainService.ApplicationSecurityDomain)

Aggregations

ApplicationSecurityDomain (org.jboss.as.ejb3.subsystem.ApplicationSecurityDomainService.ApplicationSecurityDomain)1 Registration (org.jboss.as.ejb3.subsystem.ApplicationSecurityDomainService.Registration)1 Module (org.jboss.modules.Module)1