docs: public final boolean removeExistingConfigurations(String filter) throws Exception {
          final boolean trace = TraceComponent.isAnyTracingEnabled();
  
          BundleContext bundleContext = DataSourceService.priv.getBundleContext(FrameworkUtil.getBundle(DataSourceResourceFactoryBuilder.class));
          ConfigurationAdmin configAdmin = configAdminRef.getService();
          try {
              Configuration[] existingConfigurations = configAdmin.listConfigurations(filter);
              if (existingConfigurations != null)
                  for (Configuration config : existingConfigurations) {
                      Dictionary<?, ?> cfgProps = config.getProperties();
                      // Don't remove configuration that came from server.xml
                      if (cfgProps != null && FILE.equals(cfgProps.get(CONFIG_SOURCE))) {
                          if (trace && tc.isDebugEnabled())
                              Tr.debug(tc, "configuration found in server.xml: ", config.getPid());
                          return false;
                      } else {
                          if (trace && tc.isDebugEnabled())
                              Tr.debug(tc, "removing", config.getPid());
                          config.delete();
                      }
                  }
          } finally {
              bundleContext.ungetService(configAdminRef.getReference());
          }
  
          return true;
      }