use of org.jboss.as.ejb3.deliveryactive.metadata.EJBBoundMdbDeliveryMetaData in project wildfly by wildfly.
the class MdbDeliveryMergingProcessor 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;
}
Boolean deliveryActive = null;
String deliveryGroup = null;
final List<EJBBoundMdbDeliveryMetaData> deliveryMetaDataList = assemblyDescriptor.getAny(EJBBoundMdbDeliveryMetaData.class);
if (deliveryMetaDataList != null) {
for (EJBBoundMdbDeliveryMetaData deliveryMetaData : deliveryMetaDataList) {
if ("*".equals(deliveryMetaData.getEjbName()) && deliveryActive == null && deliveryGroup == null) {
deliveryActive = deliveryMetaData.isDeliveryActive();
deliveryGroup = deliveryMetaData.getDeliveryGroup();
} else if (ejbName.equals(deliveryMetaData.getEjbName())) {
deliveryActive = deliveryMetaData.isDeliveryActive();
deliveryGroup = deliveryMetaData.getDeliveryGroup();
}
}
}
// delivery group configuration has precedence over deliveryActive
if (deliveryGroup != null) {
componentConfiguration.setDeliveryGroup(deliveryGroup);
} else if (deliveryActive != null) {
componentConfiguration.setDeliveryActive(deliveryActive);
}
}
use of org.jboss.as.ejb3.deliveryactive.metadata.EJBBoundMdbDeliveryMetaData in project wildfly by wildfly.
the class EJBBoundMdbDeliveryMetaDataParser11 method parse.
@Override
public EJBBoundMdbDeliveryMetaData parse(XMLStreamReader reader, final PropertyReplacer propertyReplacer) throws XMLStreamException {
// we only parse <delivery> (root) element
if (!ROOT_ELEMENT_DELIVERY.equals(reader.getLocalName())) {
throw unexpectedElement(reader);
}
EJBBoundMdbDeliveryMetaData metaData = new EJBBoundMdbDeliveryMetaData();
processElements(metaData, reader, propertyReplacer);
return metaData;
}
use of org.jboss.as.ejb3.deliveryactive.metadata.EJBBoundMdbDeliveryMetaData in project wildfly by wildfly.
the class EJBBoundMdbDeliveryMetaDataParser method parse.
@Override
public EJBBoundMdbDeliveryMetaData parse(XMLStreamReader reader, final PropertyReplacer propertyReplacer) throws XMLStreamException {
// we only parse <delivery> (root) element
if (!ROOT_ELEMENT_DELIVERY.equals(reader.getLocalName())) {
throw unexpectedElement(reader);
}
EJBBoundMdbDeliveryMetaData metaData = new EJBBoundMdbDeliveryMetaData();
processElements(metaData, reader, propertyReplacer);
return metaData;
}
Aggregations