@Override
  public void stop(BundleContext context) throws Exception {
    if (serviceTracker != null) {
      serviceTracker.close();
    }

    if (bundleTracker != null) {
      bundleTracker.close();
    }
  }
  @Override
  public void start(BundleContext context) throws Exception {
    bundleTracker =
        new BundleTracker(context, Bundle.ACTIVE, new ValidationResolverBundleTrackerCustomizer());
    bundleTracker.open();

    ValidationProviderHolder holder = new ValidationProviderHolder(context);

    ValidationProviderServiceTrackerCustomizer serviceTrackerCustomizer =
        new ValidationProviderServiceTrackerCustomizer(context, holder);
    serviceTracker =
        new ServiceTracker(context, ValidationProvider.class, serviceTrackerCustomizer);
    serviceTracker.open();
  }