/** * Allocates and deploys new components in the domain. * * @param domain the domain component * @throws Fabric3Exception if an error is encountered during deployment */ private void deploy(LogicalCompositeComponent domain) throws Fabric3Exception { // generate and provision any new components and new wires Deployment deployment = generator.generate(domain); collector.markAsProvisioned(domain); deployer.deploy(deployment); }
/** * Allocates and deploys new components in the domain. * * @param domain the domain component * @throws Fabric3Exception if an error is encountered during deployment */ private void deploy(LogicalCompositeComponent domain) throws Fabric3Exception { // generate and provision any new components and new wires Deployment deployment = generator.generate(domain); collector.markAsProvisioned(domain); deployer.deploy(deployment); }
public synchronized void undeploy(URI uri) throws Fabric3Exception { Contribution contribution = metadataStore.find(uri); if (contribution == null) { throw new Fabric3Exception("Contribution not found: " + uri); } List<Deployable> deployables = contribution.getManifest().getDeployables(); if (deployables.isEmpty()) { return; } LogicalCompositeComponent domain = logicalComponentManager.getDomainComposite(); collector.markForCollection(uri, domain); Deployment deployment = generator.generate(domain); collector.collect(domain); deployer.deploy(deployment); contribution.undeploy(); }
public synchronized void undeploy(Composite composite) throws Fabric3Exception { LogicalCompositeComponent domain = logicalComponentManager.getDomainComposite(); URI contributionUri = composite.getContributionUri(); collector.markForCollection(contributionUri, domain); Deployment deployment = generator.generate(domain); collector.collect(domain); deployer.deploy(deployment); Contribution contribution = metadataStore.find(contributionUri); contribution.undeploy(); }
public synchronized void undeploy(Composite composite) throws Fabric3Exception { LogicalCompositeComponent domain = logicalComponentManager.getDomainComposite(); URI contributionUri = composite.getContributionUri(); collector.markForCollection(contributionUri, domain); Deployment deployment = generator.generate(domain); collector.collect(domain); deployer.deploy(deployment); Contribution contribution = metadataStore.find(contributionUri); contribution.undeploy(); }
public synchronized void undeploy(URI uri) throws Fabric3Exception { Contribution contribution = metadataStore.find(uri); if (contribution == null) { throw new Fabric3Exception("Contribution not found: " + uri); } List<Deployable> deployables = contribution.getManifest().getDeployables(); if (deployables.isEmpty()) { return; } LogicalCompositeComponent domain = logicalComponentManager.getDomainComposite(); collector.markForCollection(uri, domain); Deployment deployment = generator.generate(domain); collector.collect(domain); deployer.deploy(deployment); contribution.undeploy(); }