Ejemplo n.º 1
0
 protected void destroyManager() {
   if (manager != null) {
     Manager mgr = manager;
     manager = null;
     try {
       mgr.destroy();
     } catch (IOException e) {
       // ignore
     }
   }
 }
Ejemplo n.º 2
0
 public void onConnected() {
   destroyManager();
   try {
     manager = new Manager(this.bundleContext, curator, uri, exportedAddress, timeout);
     manager.init();
   } catch (Exception e) {
     throw new RuntimeException("Unable to start DOSGi service: " + e.getMessage(), e);
   }
 }