Search in sources :

Example 1 with TrackedWebResource

use of org.apache.catalina.TrackedWebResource in project tomcat by apache.

the class StandardRoot method stopInternal.

@Override
protected void stopInternal() throws LifecycleException {
    for (List<WebResourceSet> list : allResources) {
        for (WebResourceSet webResourceSet : list) {
            webResourceSet.stop();
        }
    }
    if (main != null) {
        main.destroy();
    }
    mainResources.clear();
    for (WebResourceSet webResourceSet : jarResources) {
        webResourceSet.destroy();
    }
    jarResources.clear();
    for (WebResourceSet webResourceSet : classResources) {
        webResourceSet.destroy();
    }
    classResources.clear();
    for (TrackedWebResource trackedResource : trackedResources) {
        log.error(sm.getString("standardRoot.lockedFile", context.getName(), trackedResource.getName()), trackedResource.getCreatedBy());
        try {
            trackedResource.close();
        } catch (IOException e) {
        // Ignore
        }
    }
    cache.clear();
    setState(LifecycleState.STOPPING);
}
Also used : WebResourceSet(org.apache.catalina.WebResourceSet) IOException(java.io.IOException) TrackedWebResource(org.apache.catalina.TrackedWebResource)

Aggregations

IOException (java.io.IOException)1 TrackedWebResource (org.apache.catalina.TrackedWebResource)1 WebResourceSet (org.apache.catalina.WebResourceSet)1