public synchronized RuntimeContext createContext(Bundle bundle) throws Exception {
   RuntimeContext ctx = contexts.get(bundle.getSymbolicName());
   if (ctx == null) {
     // hack to handle fragment bundles
     ctx = new OSGiRuntimeContext(bundle);
     contexts.put(bundle.getSymbolicName(), ctx);
     loadComponents(bundle, ctx);
   }
   return ctx;
 }
Пример #2
0
 @Override
 protected void doStart() {
   bundleContext.addFrameworkListener(this);
   try {
     loadConfig();
   } catch (IOException e) {
     throw new RuntimeServiceException(e);
   }
   // load configuration if any
   loadComponents(bundleContext.getBundle(), context);
 }
 @Override
 protected void doStart() throws Exception {
   bundleContext.addFrameworkListener(this);
   loadConfig(); // load configuration if any
   loadComponents(bundleContext.getBundle(), context);
 }