Search in sources :

Example 1 with DependsOn

use of javax.ejb.DependsOn in project wildfly by wildfly.

the class EjbDependsOnMergingProcessor 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 classDescription = applicationClasses.getClassByName(componentClass.getName());
    if (classDescription == null) {
        return;
    }
    final EEApplicationDescription applicationDescription = deploymentUnit.getAttachment(Attachments.EE_APPLICATION_DESCRIPTION);
    final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT);
    //we ony care about annotations on the actual class
    final ClassAnnotationInformation<DependsOn, String[]> dependsOnClassAnnotationInformation = classDescription.getAnnotationInformation(DependsOn.class);
    if (dependsOnClassAnnotationInformation != null) {
        if (!dependsOnClassAnnotationInformation.getClassLevelAnnotations().isEmpty()) {
            final String[] annotationValues = dependsOnClassAnnotationInformation.getClassLevelAnnotations().get(0);
            setupDependencies(description, applicationDescription, deploymentRoot, annotationValues);
        }
    }
}
Also used : EEApplicationDescription(org.jboss.as.ee.component.EEApplicationDescription) ResourceRoot(org.jboss.as.server.deployment.module.ResourceRoot) DependsOn(javax.ejb.DependsOn) EEModuleClassDescription(org.jboss.as.ee.component.EEModuleClassDescription)

Aggregations

DependsOn (javax.ejb.DependsOn)1 EEApplicationDescription (org.jboss.as.ee.component.EEApplicationDescription)1 EEModuleClassDescription (org.jboss.as.ee.component.EEModuleClassDescription)1 ResourceRoot (org.jboss.as.server.deployment.module.ResourceRoot)1