public void resolve(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EEApplicationDescription applicationDescription = deploymentUnit.getAttachment(EE_APPLICATION_DESCRIPTION); final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT); final Set<String> names = applicationDescription.resolveMessageDestination(messageDestinationName, deploymentRoot.getRoot()); if (names.isEmpty()) { error = EeLogger.ROOT_LOGGER.noMessageDestination(messageDestinationName, bindingName); return; } if (names.size() > 1) { error = EeLogger.ROOT_LOGGER.moreThanOneMessageDestination(messageDestinationName, bindingName, names); return; } resolvedLookupName = names.iterator().next(); }
public void resolve(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EEApplicationDescription applicationDescription = deploymentUnit.getAttachment(EE_APPLICATION_DESCRIPTION); final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT); final Set<String> names = applicationDescription.resolveMessageDestination(messageDestinationName, deploymentRoot.getRoot()); if (names.isEmpty()) { error = EeLogger.ROOT_LOGGER.noMessageDestination(messageDestinationName, bindingName); return; } if (names.size() > 1) { error = EeLogger.ROOT_LOGGER.moreThanOneMessageDestination(messageDestinationName, bindingName, names); return; } resolvedLookupName = names.iterator().next(); }
public void resolve(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EEApplicationDescription applicationDescription = deploymentUnit.getAttachment(EE_APPLICATION_DESCRIPTION); final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT); final Set<String> names = applicationDescription.resolveMessageDestination(messageDestinationName, deploymentRoot.getRoot()); if (names.isEmpty()) { error = EeMessages.MESSAGES.noMessageDestination(messageDestinationName, bindingName); return; } if (names.size() > 1) { error = EeMessages.MESSAGES.moreThanOneMessageDestination(messageDestinationName, bindingName, names); return; } resolvedLookupName = names.iterator().next(); }
public void resolve(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EEApplicationDescription applicationDescription = deploymentUnit.getAttachment(EE_APPLICATION_DESCRIPTION); final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT); final Set<String> names = applicationDescription.resolveMessageDestination(messageDestinationName, deploymentRoot.getRoot()); if (names.isEmpty()) { error = EeLogger.ROOT_LOGGER.noMessageDestination(messageDestinationName, bindingName); return; } if (names.size() > 1) { error = EeLogger.ROOT_LOGGER.moreThanOneMessageDestination(messageDestinationName, bindingName, names); return; } resolvedLookupName = names.iterator().next(); }