Unregister the provided DAO class types with the connection source

@param connectionSource
connection source
@param classes
DAO class types
348726
public static void unregisterDao(ConnectionSource connectionSource,
			Class<?>... classes) {
		for (Class<?> clazz : classes) {
			unregisterDao(connectionSource, clazz);
		}
	}
437239
@Override
    public void deregisterFactories(ChannelFactoryProvider provider) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "Removing factory provider; " + provider.getClass().getName());
        }
        for (Entry<String, Class<? extends ChannelFactory>> entry : provider.getTypes().entrySet()) {
            this.providers.remove(entry.getKey());
            deregisterFactory(entry.getKey());
        }
        this.activatedProviders.remove(provider);
    }
159677
public synchronized static <D extends Dao<T, ?>, T> D lookupDao(ConnectionSource connectionSource, Class<T> clazz) {
		if (connectionSource == null) {
			throw new IllegalArgumentException("connectionSource argument cannot be null");
		}
		ClassConnectionSource key = new ClassConnectionSource(connectionSource, clazz);
		Dao<?, ?> dao = lookupDao(key);
		@SuppressWarnings("unchecked")
		D castDao = (D) dao;
		return castDao;
	}
156601
public static <T> DatabaseTableConfig<T> fromClass(ConnectionSource connectionSource, Class<T> clazz)
			throws SQLException {
		DatabaseType databaseType = connectionSource.getDatabaseType();
		String tableName = DatabaseTableConfig.extractTableName(databaseType, clazz);
		List<DatabaseFieldConfig> fieldConfigs = new ArrayList<DatabaseFieldConfig>();
		for (Class<?> classWalk = clazz; classWalk != null; classWalk = classWalk.getSuperclass()) {
			for (Field field : classWalk.getDeclaredFields()) {
				DatabaseFieldConfig config = configFromField(databaseType, tableName, field);
				if (config != null && config.isPersisted()) {
					fieldConfigs.add(config);
				}
			}
		}
		if (fieldConfigs.size() == 0) {
			return null;
		} else {
			return new DatabaseTableConfig<T>(clazz, tableName, fieldConfigs);
		}
	}
274278
protected void removeConnection(ConnectionImpl connection) {
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.entry(tc, "removeConnection", connection);

        synchronized (_connections) {
            _connections.remove(connection);
        }

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "removeConnection");
    }
258391
public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException {
		Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass);
		return doCreateTable(dao, false);
	}
1001942
public void dissociateConnections() throws ResourceException
   {
      // We don't call cleanup(), as cleanup() could be doing additional contracts
      // with the physical connection
      
      for (HelloWorldConnectionImpl connection : connections)
      {
         connection.setManagedConnection(null);
      }
      connections.clear();
   }
1071990
public function unregister($providerClass)
    {
        $providers = $this->getOption(self::OPTION_PROVIDERS);
        foreach ($providers as $key => $provider) {
            if (get_class($provider) == $providerClass) {
                unset($providers[$key]);
            }
        }
        $this->setOption(self::OPTION_PROVIDERS, $providers);
    }
271710
public void releaseConnection(Connection<T> connection)
    {
        if(connection!=null)
        {
            try
            {
                //log info
                this.LOGGER.logInfo(new Object[]{"Closing connection using factory type: ",this.getClass().getName()},null);

                //get resource
                T resource=connection.getResource();
                
                //release resource
                this.releaseResource(resource);
                
                //unregister connection
                CloseableResourceManager.unregisterCloseable(connection);

                //log info
                this.LOGGER.logInfo(new Object[]{"Connection closed."},null);
            }
            catch(Exception exception)
            {
                //log error
                this.LOGGER.logInfo(new Object[]{"Unable to close connection."},exception);
            }
        }
    }
1081006
@Override
	public void unregisterOsgiProviders (Collection<Object> providers) throws FhirConfigurationException {
		if (null == providers) {
			throw new NullPointerException("FHIR Provider list cannot be null");
		}
		try {
			for (Object provider : providers) {
				log.trace("unregistered provider. class ["+provider.getClass().getName()+"]");
				this.serverProviders.remove(provider);
			}
			super.unregisterProvider(providers);
		} catch (Exception e) {
			log.error("Error unregistering FHIR Providers", e);
			throw new FhirConfigurationException("Error unregistering FHIR Providers", e);
		}
	}
886571
public void initialize() throws SQLException {
		if (initialized) {
			// just skip it if already initialized
			return;
		}

		if (connectionSource == null) {
			throw new IllegalStateException("connectionSource was never set on " + getClass().getSimpleName());
		}

		databaseType = connectionSource.getDatabaseType();
		if (databaseType == null) {
			throw new IllegalStateException(
					"connectionSource is getting a null DatabaseType in " + getClass().getSimpleName());
		}
		if (tableConfig == null) {
			tableInfo = new TableInfo<T, ID>(databaseType, dataClass);
		} else {
			tableConfig.extractFieldTypes(databaseType);
			tableInfo = new TableInfo<T, ID>(databaseType, tableConfig);
		}
		statementExecutor = new StatementExecutor<T, ID>(databaseType, tableInfo, this);

		/*
		 * This is a bit complex. Initially, when we were configuring the field types, external DAO information would be
		 * configured for auto-refresh, foreign BaseDaoEnabled classes, and foreign-collections. This would cause the
		 * system to go recursive and for class loops, a stack overflow.
		 * 
		 * Then we fixed this by putting a level counter in the FieldType constructor that would stop the configurations
		 * when we reach some recursion level. But this created some bad problems because we were using the DaoManager
		 * to cache the created DAOs that had been constructed already limited by the level.
		 * 
		 * What we do now is have a 2 phase initialization. The constructor initializes most of the fields but then we
		 * go back and call FieldType.configDaoInformation() after we are done. So for every DAO that is initialized
		 * here, we have to see if it is the top DAO. If not we save it for dao configuration later.
		 */
		List<BaseDaoImpl<?, ?>> daoConfigList = daoConfigLevelLocal.get();
		daoConfigList.add(this);
		if (daoConfigList.size() > 1) {
			// if we have recursed then just save the dao for later configuration
			return;
		}

		try {
			/*
			 * WARNING: We do _not_ use an iterator here because we may be adding to the list as we process it and we'll
			 * get exceptions otherwise. This is an ArrayList so the get(i) should be efficient.
			 * 
			 * Also, do _not_ get a copy of daoConfigLevel.doArray because that array may be replaced by another, larger
			 * one during the recursion.
			 */
			for (int i = 0; i < daoConfigList.size(); i++) {
				BaseDaoImpl<?, ?> dao = daoConfigList.get(i);

				/*
				 * Here's another complex bit. The first DAO that is being constructed as part of a DAO chain is not yet
				 * in the DaoManager cache. If we continue onward we might come back around and try to configure this
				 * DAO again. Forcing it into the cache here makes sure it won't be configured twice. This will cause it
				 * to be stuck in twice when it returns out to the DaoManager but that's a small price to pay. This also
				 * applies to self-referencing classes.
				 */
				DaoManager.registerDao(connectionSource, dao);

				try {
					// config our fields which may go recursive
					for (FieldType fieldType : dao.getTableInfo().getFieldTypes()) {
						fieldType.configDaoInformation(connectionSource, dao.getDataClass());
					}
				} catch (SQLException e) {
					// unregister the DAO we just pre-registered
					DaoManager.unregisterDao(connectionSource, dao);
					throw e;
				}

				// it's now been fully initialized
				dao.initialized = true;
			}
		} finally {
			// if we throw we want to clear our class hierarchy here
			daoConfigList.clear();
			daoConfigLevelLocal.remove();
		}
	}
753409
public void setDataSourceConnectionSource(ConnectionSource<DataSource, DataSourceSettings> connectionSource) {
        this.dataSourceName = connectionSource.getName();
        DataSource source = connectionSource.getSource();
        getProperties().put(Environment.DATASOURCE, source);
        getProperties().put(Environment.CURRENT_SESSION_CONTEXT_CLASS, GrailsSessionContext.class.getName());
        final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
        if (contextClassLoader != null && contextClassLoader.getClass().getSimpleName().equalsIgnoreCase("RestartClassLoader")) {
            getProperties().put(AvailableSettings.CLASSLOADERS, contextClassLoader);
        } else {
            getProperties().put(AvailableSettings.CLASSLOADERS, connectionSource.getClass().getClassLoader());
        }
    }
2245
@Override
    public void destroyResources() {
        if (eurekaConnCleaner != null) {
            // Execute the connection cleaner one final time during shutdown
            eurekaConnCleaner.execute(connectionCleanerTask);
            eurekaConnCleaner.shutdown();
        }
        if (apacheHttpClient != null) {
            apacheHttpClient.close();
        }
    }
870987
def DeregisterSourceType(cls, source_type_class):
    
    if source_type_class.TYPE_INDICATOR not in cls._source_type_classes:
      raise KeyError(
          'Source type not set for type: {0:s}.'.format(
              source_type_class.TYPE_INDICATOR))

    del cls._source_type_classes[source_type_class.TYPE_INDICATOR]
1350732
public void unregisterMBeans(Collection<ResourceDMBean> resourceDMBeans) throws CacheException {
      log.trace("Unregistering jmx resources..");
      try {
         for (ResourceDMBean resource : resourceDMBeans) {
            JmxUtil.unregisterMBean(getObjectName(resource), mBeanServer);
         }
      }
      catch (Exception e) {
         throw new CacheException("Failure while unregistering mbeans", e);
      }
   }
754817
public <EventT> boolean unregister(Object key, Class<EventT> eventClass) {
    LOG.debug("[{}] Unregistering {} for {}", logPrefix, key, eventClass);
    return listeners.remove(eventClass, key);
  }
803107
@Override
  public void unregisterXAResource(String uniqueName, XAResource xaResource) {
    Ehcache3XAResourceProducer xaResourceProducer = producers.get(uniqueName);

    if (xaResourceProducer != null) {
      boolean found = xaResourceProducer.removeXAResource(xaResource);
      if (!found) {
        throw new IllegalStateException("no XAResource " + xaResource + " found in XAResourceProducer with name " + uniqueName);
      }
      if (xaResourceProducer.isEmpty()) {
        xaResourceProducer.close();
        producers.remove(uniqueName);
      }
    } else {
      throw new IllegalStateException("no XAResourceProducer registered with name " + uniqueName);
    }
  }