@Test public void testComponentServiceBinding() throws Exception { InputStream swConfigStream = Classes.getResourceAsStream("/switchyard-config-component-service-binding-01.xml", getClass()); Deployment deployment = new Deployment(swConfigStream); swConfigStream.close(); MockDomain serviceDomain = new MockDomain(); deployment.init(serviceDomain, ActivatorLoader.createActivators(serviceDomain)); boolean result = false; try { deployment.start(); } catch (SwitchYardException sye) { Assert.assertTrue(sye.getMessage().contains("Component Service bindings are not allowed. Found")); result = true; } catch (Exception e) { Assert.fail("Expected to catch a SwitchYardException on deploy."); } Assert.assertTrue("Expected to catch a SwitchYardException on deploy.", result); }
public void start() { _log.debug("Starting deployment " + getName()); try { deployReferenceBindings(); deployImplementations(); deployServiceBindings(); } catch (RuntimeException e1) { _log.debug("Undeploying partially deployed artifacts of failed deployment " + getConfig().getQName()); try { stop(); } catch (RuntimeException e2) { _log.debug("Failed to properly undeploy a partial/failed deployment " + getConfig().getQName(), e2); } throw e1; } }
Deployment extends AbstractDeployment { public void start() { _log.debug("Starting deployment " + getName()); try { deployReferenceBindings(); deployImplementations(); deployServiceBindings(); } catch (RuntimeException e1) { _log.debug("Undeploying partially deployed artifacts of failed deployment " + getConfig().getQName()); try { stop(); } catch (RuntimeException e2) { _log.debug("Failed to properly undeploy a partial/failed deployment " + getConfig().getQName(), e2); } throw e1; } } }
Deployment extends AbstractDeployment { public void start() { _log.debug("Starting deployment " + getName()); try { deployReferenceBindings(); deployImplementations(); deployServiceBindings(); } catch (RuntimeException e1) { _log.debug("Undeploying partially deployed artifacts of failed deployment " + getConfig().getQName()); try { stop(); } catch (RuntimeException e2) { _log.debug("Failed to properly undeploy a partial/failed deployment " + getConfig().getQName(), e2); } throw e1; } } Deployment(InputStream configStream);  Deployment(SwitchYardModel configModel); }
Deployment extends AbstractDeployment { public void start() { _log.debug("Starting deployment " + getName()); try { deployReferenceBindings(); deployImplementations(); deployServiceBindings(); } catch (RuntimeException e1) { _log.debug("Undeploying partially deployed artifacts of failed deployment " + getConfig().getQName()); try { stop(); } catch (RuntimeException e2) { _log.debug("Failed to properly undeploy a partial/failed deployment " + getConfig().getQName(), e2); } throw e1; } } Deployment(InputStream configStream);  Deployment(SwitchYardModel configModel); void start(); void stop(); void destroy(); @Override Lifecycle getGatwayLifecycle(final QName serviceName, final String bindingName); Activator findActivator(String type); List<String> getActivationTypes(); }
Deployment extends AbstractDeployment { public void start() { _log.debug("Starting deployment " + getName()); try { deployReferenceBindings(); deployImplementations(); deployServiceBindings(); } catch (RuntimeException e1) { _log.debug("Undeploying partially deployed artifacts of failed deployment " + getConfig().getQName()); try { stop(); } catch (RuntimeException e2) { _log.debug("Failed to properly undeploy a partial/failed deployment " + getConfig().getQName(), e2); } throw e1; } } Deployment(InputStream configStream);  Deployment(SwitchYardModel configModel); void start(); void stop(); void destroy(); @Override Lifecycle getGatwayLifecycle(final QName serviceName, final String bindingName); Activator findActivator(String type); List<String> getActivationTypes();  }