@Override public void preConfigure(final WebAppContext context) throws Exception { boolean useContainerCache = DEFAULT_USE_CONTAINER_METAINF_CACHE; if (context.getServer() != null) { Boolean attr = (Boolean)context.getServer().getAttribute(USE_CONTAINER_METAINF_CACHE); if (attr != null) useContainerCache = attr.booleanValue(); } if (LOG.isDebugEnabled()) LOG.debug("{} = {}", USE_CONTAINER_METAINF_CACHE, useContainerCache); //pre-emptively create empty lists for tlds, fragments and resources as context attributes //this signals that this class has been called. This differentiates the case where this class //has been called but finds no META-INF data from the case where this class was never called if (context.getAttribute(METAINF_TLDS) == null) context.setAttribute(METAINF_TLDS, new HashSet<URL>()); if (context.getAttribute(METAINF_RESOURCES) == null) context.setAttribute(METAINF_RESOURCES, new HashSet<Resource>()); if (context.getAttribute(METAINF_FRAGMENTS) == null) context.setAttribute(METAINF_FRAGMENTS, new HashMap<Resource, Resource>()); //always scan everything from the container's classpath scanJars(context, context.getMetaData().getContainerResources(), useContainerCache, __allScanTypes); //only look for fragments if web.xml is not metadata complete, or it version 3.0 or greater List<String> scanTypes = new ArrayList<>(__allScanTypes); if (context.getMetaData().isMetaDataComplete() || (context.getServletContext().getEffectiveMajorVersion() < 3) && !context.isConfigurationDiscovered()) scanTypes.remove(METAINF_FRAGMENTS); scanJars(context, context.getMetaData().getWebInfJars(), false, scanTypes); }
@Override public void configure(WebAppContext context) throws Exception { if (!context.isConfigurationDiscovered()) return; //order the fragments context.getMetaData().orderFragments(); }
@Override public void configure(WebAppContext context) throws Exception { if (!context.isConfigurationDiscovered()) return; //order the fragments context.getMetaData().orderFragments(); }
@Override public void configure(WebAppContext context) throws Exception { if (!context.isConfigurationDiscovered()) return; //order the fragments context.getMetaData().orderFragments(); }
@Override public void preConfigure(WebAppContext context) throws Exception { if (!context.isConfigurationDiscovered()) return; //find all web-fragment.xmls findWebFragments(context, context.getMetaData()); }
@Override public void preConfigure(WebAppContext context) throws Exception { if (!context.isConfigurationDiscovered()) return; //find all web-fragment.xmls findWebFragments(context, context.getMetaData()); }
@Override public void preConfigure(WebAppContext context) throws Exception { if (!context.isConfigurationDiscovered()) return; //find all web-fragment.xmls findWebFragments(context, context.getMetaData()); }
@Override public void preConfigure(WebAppContext context) throws Exception { if (!context.isConfigurationDiscovered()) return; //find all web-fragment.xmls findWebFragments(context, context.getMetaData()); }
@Override public void preConfigure(WebAppContext context) throws Exception { if (!context.isConfigurationDiscovered()) return; //find all web-fragment.xmls findWebFragments(context, context.getMetaData()); }
@Override public void configure(WebAppContext context) throws Exception { if (!context.isConfigurationDiscovered()) return; //order the fragments context.getMetaData().orderFragments(); }
@Override public void configure(WebAppContext context) throws Exception { if (!context.isConfigurationDiscovered()) return; //order the fragments context.getMetaData().orderFragments(); }
if (name.equals("META-INF/web-fragment.xml") && context.isConfigurationDiscovered()) else if (name.equals("META-INF/resources/") && context.isConfigurationDiscovered())
if (name.equals("META-INF/web-fragment.xml") && context.isConfigurationDiscovered()) else if (name.equals("META-INF/resources/") && context.isConfigurationDiscovered())
if (name.equals("META-INF/web-fragment.xml") && context.isConfigurationDiscovered()) else if (name.equals("META-INF/resources/") && context.isConfigurationDiscovered())
if (name.equals("META-INF/web-fragment.xml") && context.isConfigurationDiscovered()) else if (name.equals("META-INF/resources/") && context.isConfigurationDiscovered())
if (name.equals("META-INF/web-fragment.xml") && context.isConfigurationDiscovered()) else if (name.equals("META-INF/resources/") && context.isConfigurationDiscovered())
if (context.getServletContext().getEffectiveMajorVersion() >= 3 || context.isConfigurationDiscovered())
if ((context.getServletContext().getEffectiveMajorVersion() >= 3) || context.isConfigurationDiscovered())
@Override public void preConfigure(final WebAppContext context) throws Exception { boolean useContainerCache = DEFAULT_USE_CONTAINER_METAINF_CACHE; if (context.getServer() != null) { Boolean attr = (Boolean)context.getServer().getAttribute(USE_CONTAINER_METAINF_CACHE); if (attr != null) useContainerCache = attr.booleanValue(); } if (LOG.isDebugEnabled()) LOG.debug("{} = {}", USE_CONTAINER_METAINF_CACHE, useContainerCache); //pre-emptively create empty lists for tlds, fragments and resources as context attributes //this signals that this class has been called. This differentiates the case where this class //has been called but finds no META-INF data from the case where this class was never called if (context.getAttribute(METAINF_TLDS) == null) context.setAttribute(METAINF_TLDS, new HashSet<URL>()); if (context.getAttribute(METAINF_RESOURCES) == null) context.setAttribute(METAINF_RESOURCES, new HashSet<Resource>()); if (context.getAttribute(METAINF_FRAGMENTS) == null) context.setAttribute(METAINF_FRAGMENTS, new HashMap<Resource, Resource>()); //always scan everything from the container's classpath scanJars(context, context.getMetaData().getContainerResources(), useContainerCache, __allScanTypes); //only look for fragments if web.xml is not metadata complete, or it version 3.0 or greater List<String> scanTypes = new ArrayList<>(__allScanTypes); if (context.getMetaData().isMetaDataComplete() || (context.getServletContext().getEffectiveMajorVersion() < 3) && !context.isConfigurationDiscovered()) scanTypes.remove(METAINF_FRAGMENTS); scanJars(context, context.getMetaData().getWebInfJars(), false, scanTypes); }
if (context.getServletContext().getEffectiveMajorVersion() >= 3 || context.isConfigurationDiscovered()) if (LOG.isDebugEnabled()) LOG.debug("Scanning all classses for annotations: webxmlVersion="+context.getServletContext().getEffectiveMajorVersion()+" configurationDiscovered="+context.isConfigurationDiscovered()); parseContainerPath(context, parser);