tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 53619] New: If <absolute-ordering> is defined, only fragments mentioned in it shall get class-scanned
Date Mon, 30 Jul 2012 07:44:33 GMT

          Priority: P2
            Bug ID: 53619
           Summary: If <absolute-ordering> is defined, only fragments
                    mentioned in it shall get class-scanned
          Severity: normal
    Classification: Unclassified
          Hardware: PC
            Status: NEW
           Version: 7.0.29
         Component: Catalina
           Product: Tomcat 7

There was a discussion at the dev list how one could prevent his app from
scanning all the classpath if a ServletContextInitializer is found:

Mark pointed me at a current EG discussion:

The agreed status seems to be that _if_ an <absolute-ordering> element exists
in WEB-INF/web.xml, then only the web-fragments mentioned therein shall be
scanned. This is especially true if the <absolute-ordering> contains no
<others/> element.

An empty <absolute-ordering/> shall therefore disable scanning at all as far as
I understood.

This seems already be reflected in servlet-3.0 section 8.2.2 "Ordering of
web.xml and web-fragment.xml" paragraph 1.d:
"If a discovered ServletContainerInitializer is loaded from an excluded jar, it
will be ignored. Excluded jars are not scanned for classes to be handled by any

What I do not yet completely understand is that servlet-3.0 section 8.2.1
"Modularity of web.xml" explicitly defines as general rule:

"As before, if the metadata-complete element is set to true in the web.xml
descriptor, annotations in the class files and web-fragments bundled in jars
will not be processed."

This not only contradicts the 'clarification' of the EG regarding the
ServletContextInitializer which is in question here, but also could be
interpreted as : "if metadata-complete is true, then no web-fragment handling
is done. Thus also no <absolute-ordering> will be evaluated".
Not that I would like this, I just like to have this clarified upfront (before
we have to throw away some work afterwards).

Did I miss something in this regard?

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message