code: protected void deactivate(ComponentContext context) throws Exception {
  
          contextProviders.deactivate(context);
          bvalRef.deactivate(context);
          tranInflowManagerRef.deactivate(context);
          tranSyncRegistryRef.deactivate(context);
          jcaSecurityContextRef.deactivate(context);
  
          latch.countDown();
          latches.remove(resourceAdapterID, latch);
  
          FutureMonitor futureMonitor = futureMonitorSvc;
          Future<Boolean> future = appsStoppedFuture.getAndSet(null);
          if (futureMonitor != null && future != null) {
              futureMonitor.onCompletion(future, new CompletionListener<Boolean>() {
                  @Override
                  public void successfulCompletion(Future<Boolean> future, Boolean result) {
                      stopResourceAdapter();
                  }
  
                  @Override
                  public void failedCompletion(Future<Boolean> future, Throwable t) {
                      stopResourceAdapter();
                  }
              });
          } else {
              stopResourceAdapter();
          }
      }
docs: DS method to deactivate this component.
  Best practice: this should be a protected method, not public or private
  
  @param context for this component instance
  @throws Exception if the attempt to stop the resource adapter fails