@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) { // if this applies for all EJBs and if there isn't a pool name already explicitly specified // 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); } }
@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) { // if this applies for all EJBs and if there isn't a pool name already explicitly specified // for the specific bean (i.e. via a 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); } }