/**
* Install bundle - the equivalent of install action.
*
* @return
* @throws BundleException
*/
private Bundle installBundle() throws BundleException {
Assert.hasText(location, "location parameter required when installing a bundle");
// install bundle (default)
log.info("Loading bundle from [" + location + "]");
Bundle bundle = null;
boolean installBasedOnLocation = (resource == null);
if (!installBasedOnLocation) {
InputStream stream = null;
try {
stream = resource.getInputStream();
} catch (IOException ex) {
// catch it since we fallback on normal install
installBasedOnLocation = true;
}
if (!installBasedOnLocation)
bundle = bundleContext.installBundle(location, stream);
}
if (installBasedOnLocation)
bundle = bundleContext.installBundle(location);
return bundle;
}
BundleFactoryBean.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:gemini.blueprint
作者:
评论列表
文章目录