code: public synchronized void removeBootstrapContext(String id)
     {
        if (id == null || id.trim().equals(""))
           throw new IllegalArgumentException("The id of BootstrapContext is invalid: " + id);
  
        Integer i = refCountBootstrapContexts.get(id);
        if (i != null)
        {
           int newValue = i.intValue() - 1;
           if (newValue == 0)
           {
              CloneableBootstrapContext cbc = activeBootstrapContexts.remove(id);
              refCountBootstrapContexts.remove(id);
  
              cbc.shutdown();
  
              workManagerCoordinator.removeWorkManager(id);
           }
           else
           {
              refCountBootstrapContexts.put(id, Integer.valueOf(newValue));
           }
        }
     }
docs: Remove a bootstrap context
  @param id The id of the bootstrap context