Search in sources :

Example 1 with ResourceAdapter

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

the class ResourceAdaptorMergingProcessor 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<ResourceAdapter, String> resourceAdapter = clazz.getAnnotationInformation(ResourceAdapter.class);
    if (resourceAdapter == null || resourceAdapter.getClassLevelAnnotations().isEmpty()) {
        return;
    }
    final String configuredAdapterName = resourceAdapter.getClassLevelAnnotations().get(0);
    final String adapterName = addEarPrefixIfRelativeName(configuredAdapterName, deploymentUnit, componentClass);
    componentConfiguration.setResourceAdapterName(adapterName);
}
Also used : ResourceAdapter(org.jboss.ejb3.annotation.ResourceAdapter) EEModuleClassDescription(org.jboss.as.ee.component.EEModuleClassDescription)

Aggregations

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