docs: public static PortletApplicationContext getPortletApplicationContext(PortletContext pc) {
          //First check if the parent PortletApplicationContext has been set
          PortletApplicationContext parentPortletApplicationContext = getPortletApplicationContext(pc, PortletApplicationContext.ROOT_PORTLET_APPLICATION_CONTEXT_ATTRIBUTE);
          if (parentPortletApplicationContext != null) {
              return parentPortletApplicationContext;
          }
  
          //Next look to see if a PortletContextLoader exists in the PortletContext, if not we
          //can't create the context in the next step
          final PortletContextLoader portletContextLoader = (PortletContextLoader)pc.getAttribute(PortletApplicationContextUtils2.ROOT_PORTLET_APPLICATION_CONTEXT_LOADER_ATTRIBUTE);
          if (portletContextLoader == null) {
              LOGGER.info("No PortletContextLoader found, skipping load of portlet-app level context. See org.jasig.springframework.web.portlet.context.PortletContextLoaderListener for more information");
              return null;
          }
  
          //Since a loader was found use it to get/create the root PortletApplicationContext in a thread-safe manner
          //The create is done in this lazy fashion as the portlet API provides nothing like a ServletContextListener that
          //can be used to create the root PortletApplicationContext before portlets/filters are initialized
          synchronized (portletContextLoader) {
              parentPortletApplicationContext = getPortletApplicationContext(pc, PortletApplicationContext.ROOT_PORTLET_APPLICATION_CONTEXT_ATTRIBUTE);
              if (parentPortletApplicationContext == null) {
                  parentPortletApplicationContext = portletContextLoader.initWebApplicationContext(pc);
              }
          }
  
          return parentPortletApplicationContext;
      }