Search in sources :

Example 1 with ClusteredSingleton

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

the class ClusteredSingletonMergingProcessor method handleAnnotations.

@Override
protected void handleAnnotations(DeploymentUnit deploymentUnit, EEApplicationClasses applicationClasses, DeploymentReflectionIndex deploymentReflectionIndex, Class<?> componentClass, MessageDrivenComponentDescription componentDescription) 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<ClusteredSingleton, Boolean> clustering = clazz.getAnnotationInformation(ClusteredSingleton.class);
    if (clustering == null || clustering.getClassLevelAnnotations().isEmpty()) {
        return;
    }
    componentDescription.setClusteredSingleton(true);
}
Also used : ClusteredSingleton(org.jboss.ejb3.annotation.ClusteredSingleton) EEModuleClassDescription(org.jboss.as.ee.component.EEModuleClassDescription)

Aggregations

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