for (DeploymentContent content : bundlesToInstall) {
String bundleSymbolicName = content.getContentName();
Version bundleVersion = content.getExactVersion();
BundleInfo bundleInfo = null;
for (BundleInfo info : _application.getBundleInfo()) {
if (info.getSymbolicName().equals(bundleSymbolicName) &&
info.getVersion().equals(bundleVersion)) {
bundleInfo = info;
break;
}
}
if (bundleInfo == null) {
// call out to the bundle repository.
bundleInfo = resolver.getBundleInfo(bundleSymbolicName, bundleVersion);
}
if (bundleInfo == null) {
throw new ManagementException("Cound not find bundles: " + bundleSymbolicName + "_" + bundleVersion);
}
Bundle bundle = _bundleContext.installBundle(bundleInfo.getLocation());
_bundles.put(bundleInfo, bundle);
}
} catch (BundleException be) {
for (Bundle bundle : _bundles.values()) {