예제 #1
0
 protected void destroyManager() {
   if (manager != null) {
     Manager mgr = manager;
     manager = null;
     try {
       mgr.destroy();
     } catch (IOException e) {
       // ignore
     }
   }
 }
예제 #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);
   }
 }