Unpublish a web application.

@param webApp web aplication to be unpublished
@throws NullArgumentException if web app is null
347717
public void unpublish(final WebApp webApp) {
		NullArgumentException.validateNotNull(webApp, "Web app");
		LOG.debug("Unpublishing web application [{}]", webApp);
		final ServiceTracker<WebAppDependencyHolder, WebAppDependencyHolder> tracker = webApps
				.remove(webApp);
		if (tracker != null) {
			tracker.close();
		}
	}
141300
private void stopPublicationByProviderId(String providerParticipantId) {
        for (PublicationInformation publicationInformation : subscriptionId2PublicationInformation.values()) {
            if (publicationInformation.getProviderParticipantId().equals(providerParticipantId)) {
                removePublication(publicationInformation.getSubscriptionId());
            }
        }

        if (providerParticipantId != null && queuedSubscriptionRequests.containsKey(providerParticipantId)) {
            queuedSubscriptionRequests.removeAll(providerParticipantId);
        }
    }
967354
public void removeWebApplication(DeployedModule deployedModule, String contextRoot) {
        //boolean restarting = deployedModule.isRestarting();
        if (TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
            logger.logp(Level.FINE, CLASS_NAME, "removeWebApplication", "ContextRoot : " + contextRoot);
      
        String ct = makeProperContextRoot(deployedModule.getContextRoot()); // proper
        String mapRoot = makeMappingContextRoot(ct);

        //PK37449 adding synchronization block
        // removeMappedObject uses the mapped root (the same format that was used to add it)
        // removeMappedObject is synchronized, and returns the object that was removed from the map (if there was one)
        WebGroup webGroup = (WebGroup) removeMappedObject(mapRoot);

        if (webGroup != null) {
            // Begin 284644, reverse removal of web applications from map to prevent requests from coming in after app removed
            // Liberty: removed redundant call to remove mapping: call to removeMappedObject does what is needed
            
            webGroup.removeWebApplication(deployedModule);
            // End 284644, reverse removal of web applications from map to prevent requests from coming in after app removed

            //PK37449 adding trace and call to removeSubContainer() from AbstractContainer.  
            //        The call that was in WebGroup was removed.
            if (TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
                logger.logp(Level.FINE, CLASS_NAME, "removeWebApplication", "name: " + webGroup.getName());
            
            //if (!restarting)
            removeSubContainer(webGroup.getName());
            //PK37449 end
        }
    }
1132879
public void removeOfflineJspFromRepository(CmsResource resource) throws CmsLoaderException {

        String jspName = getJspRfsPath(resource, false);
        Set<String> pathSet = new HashSet<String>();
        pathSet.add(resource.getRootPath());
        ReentrantReadWriteLock lock = getFileLock(jspName);
        lock.writeLock().lock();
        try {
            removeFromCache(pathSet, false);
            File jspFile = new File(jspName);
            jspFile.delete();
        } finally {
            lock.writeLock().unlock();
        }
    }
232881
public void restartWebApplication(DeployedModule webModuleConfig) throws WebAppNotLoadedException {
        try {
            removeWebApplication(webModuleConfig);
        } catch (Exception e) {
            String groupName = webModuleConfig.getName();
            //Translated to SRVE0314E: Failed to remove web module {0}: {1}
            String message = nls.getFormattedMessage("failed.to.remove.webmodule", new Object[] { groupName, e }, "Failed to remove web module");
            logger.logp(Level.SEVERE, CLASS_NAME, "restartWebApplication", message);
            return;
        }

        addWebApplication(webModuleConfig);
    }
202661
public void deactivateApp(int appId) {
		getResourceFactory().getApiResource("/app/" + appId + "/deactivate")
				.entity(new Empty(), MediaType.APPLICATION_JSON_TYPE).post();
	}
402098
public void deletePublishList(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsException {

        getProjectDriver(dbc).deletePublishList(dbc, publishHistoryId);
    }
794724
public void visit(final WebAppListener webAppListener) {
		NullArgumentException.validateNotNull(webAppListener,
				"Web app listener");
		final EventListener listener = webAppListener.getListener();
		if (listener != null) {
			//CHECKSTYLE:OFF
			try {
				webContainer.unregisterEventListener(listener);
			} catch (Exception ignore) {
				LOG.warn("Unregistration exception. Skipping.", ignore);
			}
			//CHECKSTYLE:ON
		}
	}
99518
public void removeWebApplication(DeployedModule deployedModule) throws Exception {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {
            logger.logp(Level.FINE, CLASS_NAME, "removeWebApplication", "Deployed Module Virtual Host Name:", deployedModule.getVirtualHostName());
        }

        try {
            VirtualHost vHost = getVirtualHost(deployedModule.getVirtualHostName());

            if (vHost == null)
                throw new WebAppHostNotFoundException("VirtualHost not found");

            vHost.removeWebApplication(deployedModule);

        } catch (Exception e) {
            logger.logp(Level.SEVERE, CLASS_NAME, "removeWebApplication", "Exception", new Object[] { e }); /* 283348.1 */
            throw e;
        }

    }
1167975
public void exitApplication() {
        if (currentController != null) {
            currentController.hide(Actions.sequence(hidingActionProvider.provideAction(currentController, null),
                    Actions.run(CommonActionRunnables.getApplicationClosingRunnable())));
        } else {
            Gdx.app.exit();
        }
    }
301077
public void
        modifiedWebApplicationFactory(WebApplicationFactory<?> webApplicationFactory, Map<String, ?> properties) {
        // TODO check if this is really needed or if we are fine with the normal remove/add provided by DS...
        synchronized (this) {
            removeServicesForServiceReference(webApplicationFactory);
            addServicesForServiceReference(webApplicationFactory, properties);
            reevaluateAllBundles(webApplicationFactory);
        }
    }
888788
synchronized void unregister() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "unregister", this);
        }
        if (registration != null) {
            registration.unregister();
            registration = null;
        }
    }
797653
@Override
    public void release()
    {
        _applicationFactory = null;
        _currentFacesContext = null;
        if (_defaultExternalContext != null)
        {
            _defaultExternalContext.release();
            _defaultExternalContext = null;
        }
        
        _application = null;
        _externalContext = null;
        _viewRoot = null;
        _renderKitFactory = null;
        _elContext = null;
        _exceptionHandler = null;
        _cachedRenderKit = null;
        _cachedRenderKitId = null;
        _separatorChar = null;
        
        // Spec JSF 2 section getAttributes when release is called the attributes map
        // must!!! be cleared! (probably to trigger some clearance methods on possible
        // added entries before nullifying everything)
        if (_attributes != null)
        {
            _attributes.clear();
            _attributes = null;
        }
        
        _released = true;
        FacesContext.setCurrentInstance(null);
    }
1211953
public static void unregisterJMXBean(ServletContext servletContext, String resourceType, String mBeanPrefix) {

		try {

			MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();

			if (mbs != null) {

				ObjectName jawrConfigMgrObjName = JmxUtils.getMBeanObjectName(servletContext, resourceType,
						mBeanPrefix);

				// register the jawrApplicationConfigManager if it's not already
				// done
				ObjectName appJawrMgrObjectName = JmxUtils.getAppJawrConfigMBeanObjectName(servletContext, mBeanPrefix);
				if (mbs.isRegistered(appJawrMgrObjectName)) {
					mbs.unregisterMBean(appJawrMgrObjectName);
				}

				if (mbs.isRegistered(jawrConfigMgrObjName)) {
					mbs.unregisterMBean(jawrConfigMgrObjName);
				}
			}

		} catch (InstanceNotFoundException | MBeanRegistrationException e) {
			LOGGER.error("Unable to unregister the Jawr MBean for resource type '" + resourceType + "'", e);
		}
	}
1319471
public void publish(Object obj) {
        try {
            if (_isBatch) {
                publishBatch(obj);
            } else {
                publish(obj, true);
            }
        } catch (InsufficientCapacityException ex) {
            throw new RuntimeException("This code should be unreachable!");
        }
    }
927268
public static void destroyServlet()
    {
        Utility.getLogger().info("ServletTask destroy()");
//+     if (m_application != null)
        {   // Never
//+         m_application.removeTask(this);
//+         m_application = null; // Do not free the application... the HttpSession will
        }
        Environment env = null;
//+     if (m_application != null)
//+         env = m_application.getEnvironment();
        if (env == null)
            env = Environment.getEnvironment(null);   // Make sure environment is inited
        // If all the applications are free (except for the MainApplication), free the environment.
        Utility.getLogger().info("App count " + env.getApplicationCount());
//+        env.free();     // Done with environment if there are no more apps
    }
632444
public void remove(String applicationName, Class<?> robotContext, boolean verbose) {
        logger.info("Remove application named [{}].", applicationName);
        removeApplicationPages(applicationName, robotContext, verbose);
        removeApplicationSteps(applicationName, robotContext, verbose);
        removeApplicationModel(applicationName, robotContext, verbose);
        removeApplicationContext(robotContext, applicationName, verbose);
        removeApplicationSelector(applicationName, verbose);
        removeApplicationInPropertiesFile(applicationName, robotContext.getSimpleName().replaceAll("Context", ""), verbose);
        removeApplicationInEnvPropertiesFile(applicationName, "ci", verbose);
        removeApplicationInEnvPropertiesFile(applicationName, "dev", verbose);
        removeApplicationInEnvPropertiesFile(applicationName, "prod", verbose);
    }