Declarative Services method for removing a thread context provider.

@param ref reference to the service
165489
protected void unsetThreadContextProvider(ServiceReference<ThreadContextProvider> ref) {
        String threadContextProviderName = (String) ref.getProperty(COMPONENT_NAME);
        if (threadContextProviders.removeReference(threadContextProviderName, ref)
            && Boolean.TRUE.equals(ref.getProperty(ThreadContextProvider.ALWAYS_CAPTURE_THREAD_CONTEXT)))
            alwaysEnabled.remove(threadContextProviderName);
    }
525371
@Reference(name = REFERENCE_LIBRARY, service = Library.class)
    protected void setLibrary(ServiceReference<Library> ref) {
        libraryRef.setReference(ref);
    }
1328225
public void removeAllConversations(Object connectionReference) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "removeAllConversations", connectionReference);

        final ArrayList list;
        synchronized (activeConversations) {
            list = (ArrayList) activeConversations.remove(connectionReference);
        }

        // Remove the connection reference from the list
        if (list != null) {
            try {
                for (int x = 0; x < list.size(); x++) {
                    Conversation conv = (Conversation) list.get(x);
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                        SibTr.debug(this, tc, "Found a Conversation in the table: ", conv);
                    // Now call the server transport receive listener to clean up the resources
                    serverTransportReceiveListener.cleanupConnection(conv);
                }
            } catch (Throwable t) {
                FFDCFilter.processException(t, CLASS_NAME + ".removeAllConversations",
                                            CommsConstants.SERVERTRANSPORTACCEPTLISTENER_REMOVEALL_01,
                                            this);

                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    SibTr.debug(this, tc, "Caught an exception cleaning up a connection", t);
            }

            // Now clear the list
            list.clear();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "removeAllConversations");
    }
1303901
protected void setSerializationService(ServiceReference<SerializationService> ref) {
        if (TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, "setSerializationService", "setting " + ref);
        }
        serializationServiceRef.setReference(ref);
    }
332597
protected void setAuthDataService(ServiceReference<AuthDataService> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "setAuthDataService", ref);
        authDataServiceRef.setReference(ref);
    }
286902
static final void eraseThreadLocals(Thread thread) {
    U.putObject(thread, THREADLOCALS, null);
    U.putObject(thread, INHERITABLETHREADLOCALS, null);
  }
678096
protected void unsetDataSourceFactory(ServiceReference<ResourceFactory> ref) {
        if (TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, "unsetDataSourceFactory", "unsetting " + ref);
        }
        dataSourceFactoryRef.unsetReference(ref);
    }
667717
protected void unsetVariableRegistry(ServiceReference<VariableRegistry> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "unsetVariableRegistry", ref);
        variableRegistryRef.unsetReference(ref);
    }
1267893
protected void unsetContextProvider(ServiceReference<JCAContextProvider> ref) {
        contextProviders.removeReference((String) ref.getProperty(JCAContextProvider.TYPE), ref);
    }
816105
private boolean cleanUp(Reference<?> reference) {
    Method finalizeReferentMethod = getFinalizeReferentMethod();
    if (finalizeReferentMethod == null) {
      return false;
    }
    do {
      /*
       * This is for the benefit of phantom references. Weak and soft
       * references will have already been cleared by this point.
       */
      reference.clear();

      if (reference == frqReference) {
        /*
         * The client no longer has a reference to the
         * FinalizableReferenceQueue. We can stop.
         */
        return false;
      }

      try {
        finalizeReferentMethod.invoke(reference);
      } catch (Throwable t) {
        logger.log(Level.SEVERE, "Error cleaning up after reference.", t);
      }

      /*
       * Loop as long as we have references available so as not to waste
       * CPU looking up the Method over and over again.
       */
    } while ((reference = queue.poll()) != null);
    return true;
  }
722898
public static void removeAllThreadIdentityServices() {
        threadIdentityServices.clear();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "All the ThreadIdentityService implementations were removed.");
        }
    }
1330517
protected Map<String, Object> unsetAuthorization(ServiceReference<AuthorizationService> ref) {
        authorization.removeReference((String) ref.getProperty(KEY_ID), ref);
        authorization.removeReference(String.valueOf(ref.getProperty(KEY_SERVICE_ID)), ref);

        // determine a new authorization service
        authzService.set(null);
        return getServiceProperties();
    }
480476
public void modifed(ServiceReference<ResourceFactory> ref) {
        String[] newInterfaces = getServiceInterfaces(ref);
        if (!Arrays.equals(interfaces, newInterfaces)) {
            unregister();
            register(ref, newInterfaces);
        } else {
            registration.setProperties(getServiceProperties(ref));
        }
    }
1256432
protected void unsetConfigAdmin(ServiceReference<ConfigurationAdmin> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            SibTr.entry(tc, "unsetConfigAdmin", ref);
        configAdminRef.unsetReference(ref);

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            SibTr.exit(tc, "unsetConfigAdmin");
    }
683273
protected void unsetMetaTypeService(ServiceReference<MetaTypeService> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "unsetMetaTypeService", ref);
        metaTypeServiceRef.unsetReference(ref);
    }
154795
protected void unsetLocalTransactionCurrent(ServiceReference<LocalTransactionCurrent> ref) {
        if (TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, "unsetLocalTransactionCurrent", "unsetting " + ref);
        }
        localTransactionCurrentRef.unsetReference(ref);
    }
1029282
@Override
	public void removedService(
			final ServiceReference<HttpService> serviceReference,
			final HttpService service) {
		LOG.debug("HttpService removed {}", serviceReference);
		lock.lock();
		HttpService removedHttpService = null;
		try {
			if (context != null) {
				super.removedService(serviceReference, service);
			}
			if (httpService != service) {
				return;
			}
			removedHttpService = httpService;
			httpService = null;
		} finally {
			lock.unlock();
		}
		listener.unavailable(removedHttpService);
	}