Search in sources :

Example 1 with DeliveryGroup

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

the class MdbDeliveryMergingProcessor method handleAnnotations.

@Override
protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final MessageDrivenComponentDescription componentConfiguration) 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<DeliveryActive, Boolean> deliveryActive = clazz.getAnnotationInformation(DeliveryActive.class);
    if (deliveryActive != null) {
        if (!deliveryActive.getClassLevelAnnotations().isEmpty()) {
            componentConfiguration.setDeliveryActive(deliveryActive.getClassLevelAnnotations().get(0));
        }
    }
    final ClassAnnotationInformation<DeliveryGroup, String> deliveryGroup = clazz.getAnnotationInformation(DeliveryGroup.class);
    if (deliveryGroup != null) {
        if (!deliveryGroup.getClassLevelAnnotations().isEmpty()) {
            componentConfiguration.setDeliveryGroup(deliveryGroup.getClassLevelAnnotations().get(0));
        }
    }
}
Also used : DeliveryGroup(org.jboss.ejb3.annotation.DeliveryGroup) DeliveryActive(org.jboss.ejb3.annotation.DeliveryActive) EEModuleClassDescription(org.jboss.as.ee.component.EEModuleClassDescription)

Aggregations

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