@Activate
  void activate(Map<String, ?> configuration) {
    realm =
        configuration != null && configuration.containsKey(REALM_PROPERTY_NAME)
            ? (String) configuration.get(REALM_PROPERTY_NAME)
            : DEFAULT_REALM;
    role =
        configuration != null && configuration.containsKey(ROLE_PROPERTY_NAME)
            ? (String) configuration.get(ROLE_PROPERTY_NAME)
            : DEFAULT_ROLE;

    registerServlet();
    group = new ZooKeeperGroup<GitNode>(curator.get(), ZkPath.GIT.getPath(), GitNode.class);
    group.add(this);
    group.update(createState());
    group.start();

    activateComponent();
  }
 @Override
 public void onConnected() {
   group = ZooKeeperGroupFactory.create(zookeeper, ZkPath.GIT.getPath());
   group.add(this);
   watcher.start(group);
 }