docs: public void closeWebApplicationContext(ServletContext servletContext) {
          servletContext.log("Closing Spring root PortletApplicationContext");
          try {
              if (this.context instanceof ConfigurablePortletApplicationContext) {
                  ((ConfigurablePortletApplicationContext) this.context).close();
              }
          }
          finally {
              ClassLoader ccl = Thread.currentThread().getContextClassLoader();
              if (ccl == PortletContextLoader.class.getClassLoader()) {
                  currentContext = null;
              }
              else if (ccl != null) {
                  currentContextPerThread.remove(ccl);
              }
              servletContext.removeAttribute(PortletApplicationContext.ROOT_PORTLET_APPLICATION_CONTEXT_ATTRIBUTE);
              if (this.parentContextRef != null) {
                  this.parentContextRef.release();
              }
          }
      }