use of org.jboss.as.ejb3.resourceadapterbinding.metadata.EJBBoundResourceAdapterBindingMetaData in project wildfly by wildfly.
the class ResourceAdaptorMergingProcessor method handleDeploymentDescriptor.
@Override
protected void handleDeploymentDescriptor(final DeploymentUnit deploymentUnit, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final MessageDrivenComponentDescription componentConfiguration) throws DeploymentUnitProcessingException {
final String ejbName = componentConfiguration.getEJBName();
final EjbJarMetaData metaData = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_METADATA);
if (metaData == null) {
return;
}
final AssemblyDescriptorMetaData assemblyDescriptor = metaData.getAssemblyDescriptor();
if (assemblyDescriptor == null) {
return;
}
final List<EJBBoundResourceAdapterBindingMetaData> resourceAdapterBindingDataList = assemblyDescriptor.getAny(EJBBoundResourceAdapterBindingMetaData.class);
String configuredAdapterName = null;
if (resourceAdapterBindingDataList != null) {
for (EJBBoundResourceAdapterBindingMetaData resourceAdapterBindingData : resourceAdapterBindingDataList) {
if ("*".equals(resourceAdapterBindingData.getEjbName()) && configuredAdapterName == null) {
configuredAdapterName = resourceAdapterBindingData.getResourceAdapterName();
} else if (ejbName.equals(resourceAdapterBindingData.getEjbName())) {
configuredAdapterName = resourceAdapterBindingData.getResourceAdapterName();
}
}
}
if (configuredAdapterName != null) {
final String adapterName = addEarPrefixIfRelativeName(configuredAdapterName, deploymentUnit, componentClass);
componentConfiguration.setResourceAdapterName(adapterName);
}
}
use of org.jboss.as.ejb3.resourceadapterbinding.metadata.EJBBoundResourceAdapterBindingMetaData in project wildfly by wildfly.
the class EJBBoundResourceAdapterBindingMetaDataParser method parse.
@Override
public EJBBoundResourceAdapterBindingMetaData parse(XMLStreamReader reader, final PropertyReplacer propertyReplacer) throws XMLStreamException {
EJBBoundResourceAdapterBindingMetaData metaData = new EJBBoundResourceAdapterBindingMetaData();
processElements(metaData, reader, propertyReplacer);
return metaData;
}
Aggregations