final ModelNode node = deploymentResourceSupport.getDeploymentSubsystemModel(UndertowExtension.SUBSYSTEM_NAME); node.get(DeploymentDefinition.CONTEXT_ROOT.getName()).set("".equals(pathName) ? "/" : pathName); node.get(DeploymentDefinition.VIRTUAL_HOST.getName()).set(hostName);
@Override public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); CamelDeploymentSettings depSettings = deploymentUnit.getAttachment(CamelDeploymentSettings.ATTACHMENT_KEY); if (!depSettings.isEnabled()) { return; } final WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY); if (warMetaData == null) { /* ignore non-war deployments */ CamelLogger.LOGGER.debug("{} ignores non-WAR deployment {}", CamelEndpointDeployerProcessor.class.getSimpleName(), deploymentUnit.getName()); return; } final DeploymentResourceSupport deploymentResourceSupport = deploymentUnit .getAttachment(Attachments.DEPLOYMENT_RESOURCE_SUPPORT); final ModelNode node = deploymentResourceSupport.getDeploymentSubsystemModel(UndertowExtension.SUBSYSTEM_NAME); final String hostName = node.get(DeploymentDefinition.VIRTUAL_HOST.getName()).asString(); final String serverName = node.get(DeploymentDefinition.SERVER.getName()).asString(); final String path = node.get(DeploymentDefinition.CONTEXT_ROOT.getName()).asString(); final ServiceName deploymentServiceName = UndertowService.deploymentServiceName(serverName, hostName, path); final ServiceName deploymentInfoServiceName = deploymentServiceName .append(UndertowDeploymentInfoService.SERVICE_NAME); final ServiceName hostServiceName = UndertowService.virtualHostName(serverName, hostName); CamelEndpointDeployerService.addService(deploymentUnit, phaseContext.getServiceTarget(), deploymentInfoServiceName, hostServiceName); }
@Override public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); CamelDeploymentSettings depSettings = deploymentUnit.getAttachment(CamelDeploymentSettings.ATTACHMENT_KEY); if (!depSettings.isEnabled()) { return; } final WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY); if (warMetaData == null) { /* ignore non-war deployments */ CamelLogger.LOGGER.debug("{} ignores non-WAR deployment {}", CamelEndpointDeployerProcessor.class.getSimpleName(), deploymentUnit.getName()); return; } final DeploymentResourceSupport deploymentResourceSupport = deploymentUnit .getAttachment(Attachments.DEPLOYMENT_RESOURCE_SUPPORT); final ModelNode node = deploymentResourceSupport.getDeploymentSubsystemModel(UndertowExtension.SUBSYSTEM_NAME); final String hostName = node.get(DeploymentDefinition.VIRTUAL_HOST.getName()).asString(); final String serverName = node.get(DeploymentDefinition.SERVER.getName()).asString(); final String path = node.get(DeploymentDefinition.CONTEXT_ROOT.getName()).asString(); final ServiceName deploymentServiceName = UndertowService.deploymentServiceName(serverName, hostName, path); final ServiceName deploymentInfoServiceName = deploymentServiceName .append(UndertowDeploymentInfoService.SERVICE_NAME); final ServiceName hostServiceName = UndertowService.virtualHostName(serverName, hostName); CamelEndpointDeployerService.addService(deploymentUnit, phaseContext.getServiceTarget(), deploymentInfoServiceName, hostServiceName); }
final ModelNode node = deploymentResourceSupport.getDeploymentSubsystemModel(UndertowExtension.SUBSYSTEM_NAME); node.get(DeploymentDefinition.CONTEXT_ROOT.getName()).set("".equals(pathName) ? "/" : pathName); node.get(DeploymentDefinition.VIRTUAL_HOST.getName()).set(hostName);
final ModelNode node = deploymentResourceSupport.getDeploymentSubsystemModel(UndertowExtension.SUBSYSTEM_NAME); node.get(DeploymentDefinition.CONTEXT_ROOT.getName()).set("".equals(pathName) ? "/" : pathName); node.get(DeploymentDefinition.VIRTUAL_HOST.getName()).set(hostName);