if (bundleFile != null) {
URL url = bundleFile.toURI().toURL();
BundleInfo info = BundleInfo.createBundleInfo(url);
Deployment dep = DeploymentFactory.createDeployment(info);
dep.setAutoStart(moduleMetaData.isStart());
serviceName = bundleManager.installBundle(serviceTarget, dep);
}
else {
ModuleLoader moduleLoader = Module.getBootModuleLoader();
Module module = moduleLoader.loadModule(identifier);
OSGiMetaData metadata = getModuleMetadata(module);