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);
}
}
}
Aggregations