use of org.jboss.metadata.javaee.spec.ServiceReferenceMetaData in project wildfly by wildfly.
the class WSRefDDProcessor method processDescriptorEntries.
@Override
protected List<BindingConfiguration> processDescriptorEntries(final DeploymentUnit unit, final DeploymentDescriptorEnvironment environment, final ResourceInjectionTarget resourceInjectionTarget, final ComponentDescription componentDescription, final ClassLoader classLoader, final DeploymentReflectionIndex deploymentReflectionIndex, final EEApplicationClasses applicationClasses) throws DeploymentUnitProcessingException {
final ServiceReferencesMetaData serviceRefsMD = environment.getEnvironment().getServiceReferences();
if (serviceRefsMD == null) {
return Collections.<BindingConfiguration>emptyList();
}
final List<BindingConfiguration> bindingDescriptions = new LinkedList<BindingConfiguration>();
for (final ServiceReferenceMetaData serviceRefMD : serviceRefsMD) {
final UnifiedServiceRefMetaData serviceRefUMDM = getServiceRef(unit, componentDescription, serviceRefMD);
final Module module = unit.getAttachment(Attachments.MODULE);
WebServiceManagedReferenceFactory factory = new WebServiceManagedReferenceFactory(serviceRefUMDM, module.getClassLoader());
final FixedInjectionSource valueSource = new FixedInjectionSource(factory, factory);
final BindingConfiguration bindingConfiguration = new BindingConfiguration(serviceRefUMDM.getServiceRefName(), valueSource);
bindingDescriptions.add(bindingConfiguration);
final String serviceRefTypeName = serviceRefUMDM.getServiceRefType();
final Class<?> serviceRefType = getClass(classLoader, serviceRefTypeName);
processInjectionTargets(resourceInjectionTarget, valueSource, classLoader, deploymentReflectionIndex, serviceRefMD, serviceRefType);
}
return bindingDescriptions;
}
Aggregations