Author: markt
Date: Fri Jun 14 13:43:56 2013
New Revision: 1493066

URL: http://svn.apache.org/r1493066
Log:
Container provided JARs should not be scanned for deployment annotations nor 
should they be checked for web-fragment.xml files.

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1493066&r1=1493065&r2=1493066&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Fri Jun 14 
13:43:56 2013
@@ -1149,9 +1149,10 @@ public class ContextConfig implements Li
 
         // Ordering is important here
 
-        // Step 1. Identify all the JARs packaged with the application
-        // If the JARs have a web-fragment.xml it will be parsed at this
-        // point.
+        // Step 1. Identify all the JARs packaged with the application and 
those
+        // provided by the container. If any of the application JARs have a
+        // web-fragment.xml it will be parsed at this point. web-fragment.xml
+        // files are ignored for container provided JARs.
         Map<String,WebXml> fragments = processJarsForWebFragments();
 
         // Step 2. Order the fragments.
@@ -2734,8 +2735,12 @@ public class ContextConfig implements Li
             fragment.setWebappJar(isWebapp);
 
             try {
-                jar = JarFactory.newInstance(url);
-                is = jar.getInputStream(FRAGMENT_LOCATION);
+                // Only web application JARs are scanned for deployment
+                // annotations and web-fragment.xml files
+                if (isWebapp) {
+                    jar = JarFactory.newInstance(url);
+                    is = jar.getInputStream(FRAGMENT_LOCATION);
+                }
 
                 if (is == null) {
                     // If there is no web.xml, normal JAR no impact on



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to