code: public void deactivateEndpoint(Object activationSpec, WSMessageEndpointFactory messageEndpointFactory) throws ResourceException {
          try {
              if (activationSpec instanceof ActivationSpec) {
                  if (endpointActivationParams.remove(new ActivationParams(activationSpec, messageEndpointFactory)))
                      endpointDeactivation((ActivationSpec) activationSpec, messageEndpointFactory);
                  else if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      Tr.debug(this, tc, "already deactivated");
              } else {
                  //TODO We need to handle the case when @Activation is used.
                  throw new UnsupportedOperationException();
              }
          } catch (Exception ex) {
              Tr.error(tc, "J2CA8803.deactivation.failed", bootstrapContextRef.getReference().getProperty(Constants.SERVICE_PID), ex);
              throw new ResourceException(ex);
          }
      }
docs: Deactivate the endpoint corresponding to the specified activation spec instance.
  
  @param activationSpec the activation spec instance.
  @param messageEndpointFactory the message endpoint factory.
  @throws ResourceException