/** * If the given service is in ghost state, force the actual service deployment. This method * is useful when we want to make sure the actual service is in the system before we do some * operation on the service. * * @param serviceName - name of the service */ public void forceActualServiceDeployment(String serviceName) { AxisService service = axisConfig.getServiceForActivation(serviceName); if (service == null) { // try to find it from the transit ghost map try { service = GhostDeployerUtils .getTransitGhostServicesMap(axisConfig).get(serviceName); } catch (AxisFault axisFault) { log.error("Error while reading Transit Ghosts map", axisFault); } } if (service != null && GhostDeployerUtils.isGhostService(service)) { // if the service is a ghost service, load the actual service try { GhostDeployerUtils.deployActualService(axisConfig, service); } catch (AxisFault axisFault) { log.error("Error while loading actual service from Ghost", axisFault); } } }
@Override public void creatingConfigurationContext(int tenantId) { try { if (!CarbonRepositoryUtils.isSynchronizerEnabled(tenantId)) { return; } if (log.isDebugEnabled()) { log.debug("Initializing the deployment synchronizer for tenant: " + tenantId); } DeploymentSynchronizer depsync = CarbonRepositoryUtils.newCarbonRepositorySynchronizer(tenantId); if (GhostDeployerUtils.isGhostOn() && GhostDeployerUtils.isPartialUpdateEnabled() && CarbonUtils.isWorkerNode() && tenantId > 0) { depsync.syncGhostMetaArtifacts(); } else { depsync.doInitialSyncUp(); } //TODO: Need to sync up only the ghost metadata is ghost deployment has been enabled } catch (DeploymentSynchronizerException e) { log.error("Error while initializing the deployment synchronizer for tenant: " + tenantId); } }
private AxisService getAxisService(String serviceName) { AxisConfiguration axisConfiguration = getAxisConfig(); AxisService axisService = axisConfiguration.getServiceForActivation(serviceName); // Check if the service in in ghost list try { if (axisService == null && GhostDeployerUtils. getTransitGhostServicesMap(axisConfiguration).containsKey(serviceName)) { GhostDeployerUtils.waitForServiceToLeaveTransit(serviceName, getAxisConfig()); axisService = axisConfiguration.getServiceForActivation(serviceName); } } catch (AxisFault axisFault) { log.error("Error occurred while service : " + serviceName + " is " + "trying to leave transit", axisFault); } return axisService; }
disableRESTCalls(service.getName(), securityScenario.getScenarioId()); if (GhostDeployerUtils.isGhostService(service)) { try { service = GhostDeployerUtils.deployActualService(axisConfig, service); } catch (AxisFault axisFault) { log.error("Error while loading actual service from Ghost", axisFault);
.getTransitGhostServicesMap(axisConfig).get(serviceName); } catch (AxisFault axisFault) { log.error("Error while reading Transit Ghosts map", axisFault);
disableRESTCalls(service.getName(), securityScenario.getScenarioId()); if (GhostDeployerUtils.isGhostService(service)) { try { service = GhostDeployerUtils.deployActualService(axisConfig, service); } catch (AxisFault axisFault) { log.error("Error while loading actual service from Ghost", axisFault);
.getTransitGhostServicesMap(axisConfig).get(serviceName); } catch (AxisFault axisFault) { log.error("Error while reading Transit Ghosts map", axisFault);
/** * If the given service is in ghost state, force the actual service deployment. This method * is useful when we want to make sure the actual service is in the system before we do some * operation on the service. * * @param serviceName - name of the service */ public void forceActualServiceDeployment(String serviceName) { AxisService service = axisConfig.getServiceForActivation(serviceName); if (service == null) { // try to find it from the transit ghost map try { service = GhostDeployerUtils .getTransitGhostServicesMap(axisConfig).get(serviceName); } catch (AxisFault axisFault) { log.error("Error while reading Transit Ghosts map", axisFault); } } if (service != null && GhostDeployerUtils.isGhostService(service)) { // if the service is a ghost service, load the actual service try { GhostDeployerUtils.deployActualService(axisConfig, service); } catch (AxisFault axisFault) { log.error("Error while loading actual service from Ghost", axisFault); } } }
disableRESTCalls(service.getName(), securityScenario.getScenarioId()); if (GhostDeployerUtils.isGhostService(service)) { try { service = GhostDeployerUtils.deployActualService(axisConfig, service); } catch (AxisFault axisFault) { log.error("Error while loading actual service from Ghost", axisFault);
.getTransitGhostServicesMap(axisConfig).get(serviceName); } catch (AxisFault axisFault) { log.error("Error while reading Transit Ghosts map", axisFault);
if (GhostDeployerUtils.isGhostOn() && GhostDeployerUtils.isPartialUpdateEnabled() && CarbonUtils.isWorkerNode() && tenantId > 0) { synchronizer.syncGhostMetaArtifacts(); synchronizer.doInitialSyncUp(); } else if (GhostDeployerUtils.isGhostOn() && GhostDeployerUtils.isPartialUpdateEnabled() && CarbonUtils.isWorkerNode() && tenantId > 0) { return synchronizer.syncGhostMetaArtifacts();
/** * If the given service is in ghost state, force the actual service deployment. This method * is useful when we want to make sure the actual service is in the system before we do some * operation on the service. * * @param serviceName - name of the service */ public void forceActualServiceDeployment(String serviceName) { AxisService service = axisConfig.getServiceForActivation(serviceName); if (service == null) { // try to find it from the transit ghost map try { service = GhostDeployerUtils .getTransitGhostServicesMap(axisConfig).get(serviceName); } catch (AxisFault axisFault) { log.error("Error while reading Transit Ghosts map", axisFault); } } if (service != null && GhostDeployerUtils.isGhostService(service)) { // if the service is a ghost service, load the actual service try { GhostDeployerUtils.deployActualService(axisConfig, service); } catch (AxisFault axisFault) { log.error("Error while loading actual service from Ghost", axisFault); } } }
.getTransitGhostServicesMap(axisConfig).get(serviceName); } catch (AxisFault axisFault) { log.error("Error while reading Transit Ghosts map", axisFault); if (GhostDeployerUtils.isGhostService(service)) { service = GhostDeployerUtils.deployActualService(axisConfig, service);
.getTransitGhostServicesMap(axisConfig).get(serviceName); } catch (AxisFault axisFault) { log.error("Error while reading Transit Ghosts map", axisFault); if (GhostDeployerUtils.isGhostService(service)) { service = GhostDeployerUtils.deployActualService(axisConfig, service);
.getTransitGhostServicesMap(axisConfig).get(serviceName); } catch (AxisFault axisFault) { log.error("Error while reading Transit Ghosts map", axisFault); if (GhostDeployerUtils.isGhostService(service)) { service = GhostDeployerUtils.deployActualService(axisConfig, service);