/** * Activates and optionally deploys definitions to a domain. * * @param uri the URI of the contribution containing the definitions to activate * @param recover true if recovery is being performed. If true and the runtime is in distributed (controller) mode, definitions will only be * activated. * @throws DeploymentException if there is an error activating definitions */ private synchronized void activateAndDeployDefinitions(URI uri, boolean recover) throws DeploymentException { Contribution contribution = metadataStore.find(uri); if (contribution == null) { throw new DeploymentException("Contribution not installed: " + uri); } if (ContributionState.INSTALLED != contribution.getState()) { throw new ContributionNotInstalledException("Contribution is not installed: " + uri); } Set<PolicySet> policySets = activateDefinitions(contribution); if (!policySets.isEmpty()) { if (!recover || RuntimeMode.VM == info.getRuntimeMode()) { deployPolicySets(policySets); } } }
domain = CopyUtil.copy(domain); activateDefinitions(contribution); InstantiationContext context = logicalModelInstantiator.include(composite, domain); if (context.hasErrors()) {