code: protected void deactivate(ComponentContext context) throws Exception {
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(this, tc, "MongoService deactivate");
          }
  
          try {
              closeMongoClient();
              if (sslHelper != null) {
                  sslHelper.removeChangeListener(this);
              }
          } finally {
              libraryRef.deactivate(context);
              sslConfigurationRef.deactivate(context);
              keyStoreServiceRef.deactivate(context);
          }
      }
docs: DS method to deactivate this component.
  Best practice: this should be a protected method, not public or private
  
  @param context DeclarativeService defined/populated component context
  @throws Exception if unable to close the Mongo instance