try {
for (Component component : composite.getComponents()) {
compositeActivator.stop(component);
}
} catch (ActivationException e) {
throw new ServiceRuntimeException(e);
}
}
for (Composite composite : domainComposite.getIncludes()) {
try {
compositeActivator.deactivate(composite);
} catch (ActivationException e) {
throw new ServiceRuntimeException(e);
}
}
// Remove the contribution from the in-memory repository
ContributionService contributionService = runtime.getContributionService();
for (Contribution contribution : contributions) {
try {
contributionService.remove(contribution.getURI());
} catch (ContributionException e) {
throw new ServiceRuntimeException(e);
}
}
// Stop the runtime
try {
runtime.stop();
} catch (ActivationException e) {
throw new ServiceRuntimeException(e);
}
}