throw new IllegalStateException(); if (failedServiceDescription.getDeployment().getVersion().compareTo( serviceDescription.getDeployment().getVersion()) != 0) { failedServiceDescriptions.remove(serviceName);
throw new IllegalStateException(); if (failedServiceDescription.getDeployment().getVersion().compareTo( serviceDescription.getDeployment().getVersion()) != 0) { failedServiceDescriptions.remove(serviceName);
/** * {@inheritDoc} */ public void redeploy(ServiceDescription serviceDescription) throws RuleServiceDeployException, RuleServiceUndeployException { OpenLService service = ruleServicePublisher.getServiceByName(serviceDescription.getName()); if (service == null) { throw new RuleServiceUndeployException( String.format("There is no running service with name '%s'.", serviceDescription.getName())); } try { ServiceDescription sd = mapping.get(serviceDescription.getName()); if (sd == null) { throw new IllegalStateException("Invalid state!!!"); } if (sd.getDeployment().getVersion().compareTo(serviceDescription.getDeployment().getVersion()) != 0) { undeploy(service.getName()); OpenLService openLService = ruleServiceInstantiationFactory.createService(serviceDescription); deploy(serviceDescription, openLService); } } catch (RuleServiceInstantiationException e) { throw new RuleServiceDeployException("Failed on redeploy service", e); } }
/** * {@inheritDoc} */ public void redeploy(ServiceDescription serviceDescription) throws RuleServiceDeployException, RuleServiceUndeployException { OpenLService service = ruleServicePublisher.getServiceByName(serviceDescription.getName()); if (service == null) { throw new RuleServiceUndeployException( String.format("There is no running service with name '%s'.", serviceDescription.getName())); } try { ServiceDescription sd = mapping.get(serviceDescription.getName()); if (sd == null) { throw new IllegalStateException("Invalid state!!!"); } if (sd.getDeployment().getVersion().compareTo(serviceDescription.getDeployment().getVersion()) != 0) { undeploy(service.getName()); OpenLService openLService = ruleServiceInstantiationFactory.createService(serviceDescription); deploy(serviceDescription, openLService); } } catch (RuleServiceInstantiationException e) { throw new RuleServiceDeployException("Failed on redeploy service", e); } }