use of org.osgi.service.framework.CompositeBundleFactory in project aries by apache.
the class BundleFrameworkFactoryImpl method createBundleFramework.
public BundleFramework createBundleFramework(BundleContext bc, BundleFrameworkConfiguration config) throws BundleException {
BundleFramework framework = null;
ServiceReference sr = bc.getServiceReference(CompositeBundleFactory.class.getName());
if (sr != null) {
CompositeBundleFactory cbf = (CompositeBundleFactory) bc.getService(sr);
CompositeBundle compositeBundle = cbf.installCompositeBundle(config.getFrameworkProperties(), config.getFrameworkID(), config.getFrameworkManifest());
framework = new BundleFrameworkImpl(compositeBundle);
} else
throw new BundleException("Failed to obtain framework factory service");
return framework;
}
Aggregations