@Override public void undeploySynapseArtifact(String artifactName) { if (log.isDebugEnabled()) { log.debug("ProxyService Undeployment of the proxy named : " + artifactName + " : Started"); } try { ProxyService proxy = getSynapseConfiguration().getProxyService(artifactName); if (proxy != null) { if (log.isDebugEnabled()) { log.debug("Stopping the ProxyService named : " + artifactName); } proxy.stop(getSynapseConfiguration()); getSynapseConfiguration().removeProxyService(artifactName); if (log.isDebugEnabled()) { log.debug("ProxyService Undeployment of the proxy named : " + artifactName + " : Completed"); } log.info("ProxyService named '" + proxy.getName() + "' has been undeployed"); } else if (log.isDebugEnabled()) { log.debug("Proxy service " + artifactName + " has already been undeployed"); } } catch (Exception e) { handleSynapseArtifactDeploymentError( "ProxyService Undeployement of proxy named : " + artifactName + " : Failed", e); } }
@Override public void undeploySynapseArtifact(String artifactName) { if (log.isDebugEnabled()) { log.debug("ProxyService Undeployment of the proxy named : " + artifactName + " : Started"); } try { ProxyService proxy = getSynapseConfiguration().getProxyService(artifactName); if (proxy != null) { proxy.setLogSetterValue(); if (log.isDebugEnabled()) { log.debug("Stopping the ProxyService named : " + artifactName); } proxy.stop(getSynapseConfiguration()); getSynapseConfiguration().removeProxyService(artifactName); if (log.isDebugEnabled()) { log.debug("ProxyService Undeployment of the proxy named : " + artifactName + " : Completed"); } log.info("ProxyService named '" + proxy.getName() + "' has been undeployed"); } else if (log.isDebugEnabled()) { log.debug("Proxy service " + artifactName + " has already been undeployed"); } } catch (Exception e) { handleSynapseArtifactDeploymentError( "ProxyService Undeployement of proxy named : " + artifactName + " : Failed", e); } }
log.info("Deployed Proxy service : " + proxy.getName()); if (!proxy.isStartOnLoad()) { proxy.stop(synapseConfiguration);
log.info("Deployed Proxy service : " + proxy.getName()); if (!proxy.isStartOnLoad()) { proxy.stop(synapseConfiguration);
currentProxy.stop(getSynapseConfiguration()); getSynapseConfiguration().removeProxyService(existingArtifactName); if (!existingArtifactName.equals(proxy.getName())) {
currentProxy.stop(getSynapseConfiguration()); getSynapseConfiguration().removeProxyService(existingArtifactName); if (!existingArtifactName.equals(proxy.getName())) {
proxy.stop(getSynapseConfiguration()); log.info("ProxyService named '" + proxy.getName() + "' has been stopped as startOnLoad parameter is set to false");
/** * Tests starting a proxy service without proving an axis configuration. The proxy service should not start by this. */ public void testStartWithoutAxisConfiguration() { SynapseConfiguration synCfg = new SynapseConfiguration(); synCfg.setAxisConfiguration(null); ProxyService proxyService = new ProxyService("TestStartWithoutAxisConfigurationProxy"); proxyService.start(synCfg); Assert.assertFalse("Proxy service is running without axis configuration", proxyService.isRunning()); proxyService.stop(synCfg); }
/** * Tests starting a proxy service with correct axis configuration provided. * * @throws Exception if an exception occurs while configuring the axis configuration */ public void testStart() throws Exception { String proxyServiceName = "TestStartProxy"; SynapseConfiguration synCfg = new SynapseConfiguration(); AxisConfiguration axisCfg = new AxisConfiguration(); SynapseEnvironment synEnv = new Axis2SynapseEnvironment(new ConfigurationContext(axisCfg), synCfg); axisCfg.addParameter(SynapseConstants.SYNAPSE_ENV, synEnv); synCfg.setAxisConfiguration(axisCfg); ProxyService proxyService = new ProxyService(proxyServiceName); AxisService axisServiceForActivation = new AxisService(); axisServiceForActivation.setName(proxyServiceName); axisCfg.addToAllServicesMap(axisServiceForActivation); proxyService.setTargetInLineInSequence(new SequenceMediator()); proxyService.setTargetInLineOutSequence(new SequenceMediator()); proxyService.setTargetInLineFaultSequence(new SequenceMediator()); proxyService.start(synCfg); Assert.assertTrue("Underlying Axis service is not activated", axisServiceForActivation.isActive()); Assert.assertTrue("Proxy service is not running", proxyService.isRunning()); proxyService.stop(synCfg); }