use of org.jboss.as.ejb3.pool.EJBBoundPoolMetaData in project wildfly by wildfly.
the class AbstractPoolMergingProcessor method handleDeploymentDescriptor.
@Override
protected void handleDeploymentDescriptor(DeploymentUnit deploymentUnit, DeploymentReflectionIndex deploymentReflectionIndex, Class<?> componentClass, T description) throws DeploymentUnitProcessingException {
final String ejbName = description.getEJBName();
final EjbJarMetaData metaData = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_METADATA);
if (metaData == null) {
return;
}
final AssemblyDescriptorMetaData assemblyDescriptor = metaData.getAssemblyDescriptor();
if (assemblyDescriptor == null) {
return;
}
// get the pool metadata
final List<EJBBoundPoolMetaData> pools = assemblyDescriptor.getAny(EJBBoundPoolMetaData.class);
String poolName = null;
if (pools != null) {
for (final EJBBoundPoolMetaData poolMetaData : pools) {
// for the specific bean (i.e. via an ejb-name match)
if ("*".equals(poolMetaData.getEjbName()) && poolName == null) {
poolName = poolMetaData.getPoolName();
} else if (ejbName.equals(poolMetaData.getEjbName())) {
poolName = poolMetaData.getPoolName();
}
}
}
if (poolName != null) {
this.setPoolName(description, poolName);
}
}
Aggregations