/*
public void close(){
if(container != null){
Ruby runtime = container.getProvider().getRuntime();
runtime.tearDown(false);
log.debug("Tear down JRuby runtime: {}", runtime);
}
}
320287
private void buildBasicScript(PrintWriter script) {
        //script.println("require 'rubygems'");
        script.println("require 'compass'");
        script.println("frameworks = Dir.new(Compass::Frameworks::DEFAULT_FRAMEWORKS_PATH).path");
        script.println("Compass::Frameworks.register_directory(File.join(frameworks, 'compass'))");
        script.println("Compass::Frameworks.register_directory(File.join(frameworks, 'blueprint'))");
        script.println("Compass.add_project_configuration '" + config + "'");
        script.println("Compass.configure_sass_plugin!");
    }
1309136
public void close() {
		if (this.sock != null)
			try {
				this.sock_in.close();
				this.sock_out.close();
				this.sock.close();
				this.sock=null;
				this.sock_in=null;
				this.sock_out=null;
			} catch (IOException e) {
			}
	}
627841
public void close() {
        // getting a read lock will ensure all writes have finished
        // if we are really closing assume that we don't care about reads
        readLock.lock();
        try {
            if (container != null) {
                try {
                    container.close();
                    container = null;
                    log.info("Closed container");
                } catch (XmlException e) {
                    log.warn("close failed: " + e.getMessage(), e);
                }
            }

            if (manager != null) {
                try {
                    manager.close();
                    manager = null;
                    log.info("Closed manager");
                } catch (XmlException e) {
                    log.warn("close failed: " + e.getMessage(), e);
                }
            }
        } finally {
            readLock.unlock();
        }
    }
88273
@Override
    public void stop() {
        // Run jersey shutdown lifecycle
        if (container != null) {
            container.stop();
            container = null;
        }
        // Destroy the jersey service locator
        if (jerseyHandler != null && jerseyHandler.getDelegate() != null) {
            ServiceLocatorFactory.getInstance().destroy(jerseyHandler.getDelegate().getServiceLocator());
            jerseyHandler = null;
        }
        if (server != null) {
            server.close();
            server = null;
        }
    }
80903
@Override
  public void destroy()
  {
    Thread thread = Thread.currentThread();
    ClassLoader oldLoader = thread.getContextClassLoader();
    
    try {
      thread.setContextClassLoader(this);
      
      WeakStopListener stopListener = _stopListener;
      _stopListener = null;

      super.destroy();
      
      thread.setContextClassLoader(oldLoader);

      ClassLoader parent = getParent();
      for (; parent != null; parent = parent.getParent()) {
        if (parent instanceof EnvironmentClassLoader) {
          EnvironmentClassLoader loader = (EnvironmentClassLoader) parent;

          loader.removeListener(stopListener);
        }
      }
    } finally {
      thread.setContextClassLoader(oldLoader);
      
      //_owner = null;
      _attributes = null;
      _listeners = null;
      //_scanListeners = null;
      //_stopListener = null;

      /*
      EnvironmentAdmin admin = _admin;
      _admin = null;

      if (admin != null)
        admin.unregister();
        */
    }
  }
89049
@Override
  public final void close() {
    try {
      doClose();
      isClosed = true;
    } catch (Exception e) {
      Throwables.propagate(e);
    }
  }
104817
public void close() {
    Closeable closable = getClosable();
    try {
      LOG.closingResponse(this);
      closable.close();
      LOG.successfullyClosedResponse(this);
    } catch (IOException e) {
      throw LOG.exceptionWhileClosingResponse(e);
    }
  }
1107054
@Override
    public void close() {
        if (unprocessed != null) {
            try {
                unprocessed.forEach(ByteBuf::release);
            } finally {
                unprocessed = null;
            }

            if (endOfStream) {
                listener.endOfStream();
            }
        }
    }
1252863
@Override
    public void close() {
        if (mIsClosed) {
            return;
        }
        mIsClosed = true;

        mRetrofit = null;
        mRetrofitService = null;
        mRequestSignatorInterceptor = null;
        mHttpLoggingInterceptor = null;

        mApplicationContext.clear();
        mApplicationContext = null;

        mClientKey = null;
    }
588305
public synchronized void destroy()
    {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) 
            logger.logp(Level.FINE, CLASS_NAME,"destroy", "entry");

        /*destroying=true;
        
        if (nServicing>0){
        	try {
				this.wait();
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				
			}
        }*/
    	
        super.destroy();

        //parent.removeSubContainer(name);    	//PK37449
    	this.requestMapper = null;
    	this.config = null;
    	this.webApp = null;  // PK25527
        
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) 
        	logger.exiting(CLASS_NAME, "destroy");													//569469
    }
1156330
@Override
  public void close() {
    LOG.info("Closing " + this.getClass().getSimpleName());
    try (Connection conn = createConnection()) {
      JdbcWriterCommands commands = createJdbcWriterCommands(conn);
      if (!this.createdStagingTables.isEmpty()) {
        for (String stagingTable : this.createdStagingTables) {
          LOG.info("Dropping staging table " + this.createdStagingTables);
          commands.drop(database, stagingTable);
        }
      }

      if (this.userCreatedStagingTable != null) {
        LOG.info("Truncating staging table " + this.userCreatedStagingTable);
        commands.truncate(database, this.userCreatedStagingTable);
      }
    } catch (SQLException e) {
      throw new RuntimeException("Failed to close", e);
    }
  }
699411
@Override
    public void close()
            throws IOException
    {
        if (closed) {
            return;
        }
        try {
            flush();
            out.close();
        }
        finally {
            closed = true;
            inputBufferAllocator.release(inputBuffer);
            outputBufferAllocator.release(outputBuffer);
            inputBuffer = null;
            outputBuffer = null;
        }
    }
923869
public void shutdown() throws Throwable
   {
      if (!started)
         throw new IllegalStateException("Container not started");

      if (shrinkwrapDeployments != null && !shrinkwrapDeployments.isEmpty())
      {
         List<File> copy = new ArrayList<File>(shrinkwrapDeployments);
         for (File f : copy)
         {
            removeDeployment(f);
         }
      }

      if (fullProfile)
      {
         undeploy(SecurityActions.getClassLoader(EmbeddedJCA.class), "ds.xml");
         undeploy(SecurityActions.getClassLoader(EmbeddedJCA.class), "jca.xml");
         undeploy(SecurityActions.getClassLoader(EmbeddedJCA.class), "transaction.xml");
         undeploy(SecurityActions.getClassLoader(EmbeddedJCA.class), "stdio.xml");
         undeploy(SecurityActions.getClassLoader(EmbeddedJCA.class), "naming.xml");
      }

      kernel.shutdown();

      started = false;
   }
480047
@Override
    public void close() {
        if (!this.closed.getAndSet(true)) {
            // Close all containers that are still open.
            ArrayList<CompletableFuture<Void>> results = new ArrayList<>();
            synchronized (this.handles) {
                ArrayList<ContainerHandle> toClose = new ArrayList<>(this.handles.values());
                for (ContainerHandle handle : toClose) {
                    results.add(this.registry.stopContainer(handle, CLOSE_TIMEOUT_PER_CONTAINER));
                }
            }

            // Wait for all the containers to be closed.
            Futures.await(Futures.allOf(results), CLOSE_TIMEOUT_PER_CONTAINER.toMillis());
        }
    }
1116053
public void close()
    {
        selector.wakeup();
        try
        {
            selector.close();
        }
        catch (final IOException ex)
        {
            LangUtil.rethrowUnchecked(ex);
        }
    }
522276
@Override
	public void close() {
		try {
			if (!jacksonParser.isClosed())
				jacksonParser.close();
		} catch (IOException e) {
			e.printStackTrace();
			throw(new KriptonRuntimeException(e));
		}
		
	}
728860
public String close() {
        if (instance == null) {
            return null;
        }
        try {
            container.close();
            instance = null;
        } catch (IOException e) {
            return e.getMessage();
        }
        return null;
    }