Search in sources :

Example 1 with SecurityDomain

use of org.jboss.ejb3.annotation.SecurityDomain in project wildfly by wildfly.

the class SecurityDomainMergingProcessor method handleAnnotations.

@Override
protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final EJBComponentDescription description) throws DeploymentUnitProcessingException {
    final EEModuleClassDescription clazz = applicationClasses.getClassByName(componentClass.getName());
    //we only care about annotations on the bean class itself
    if (clazz == null) {
        return;
    }
    final ClassAnnotationInformation<SecurityDomain, String> securityDomain = clazz.getAnnotationInformation(SecurityDomain.class);
    if (securityDomain == null) {
        return;
    }
    if (!securityDomain.getClassLevelAnnotations().isEmpty()) {
        if (ROOT_LOGGER.isDebugEnabled()) {
            ROOT_LOGGER.debug("EJB " + description.getEJBName() + " is part of security domain " + securityDomain.getClassLevelAnnotations().get(0));
        }
        description.setSecurityDomain(securityDomain.getClassLevelAnnotations().get(0));
    }
}
Also used : EEModuleClassDescription(org.jboss.as.ee.component.EEModuleClassDescription) SecurityDomain(org.jboss.ejb3.annotation.SecurityDomain)

Aggregations

EEModuleClassDescription (org.jboss.as.ee.component.EEModuleClassDescription)1 SecurityDomain (org.jboss.ejb3.annotation.SecurityDomain)1