On 19/09/2013 16:31, Jeremy Boynes wrote: > On Sep 19, 2013, at 6:07 AM, ma...@apache.org wrote: > >> Author: markt Date: Thu Sep 19 13:07:02 2013 New Revision: >> 1524727 >> >> URL: http://svn.apache.org/r1524727 Log: Always load container >> SCIs first > > This seems at odds with the requirement that "the order in which > these services are discovered MUST follow the application’s class > loading delegation model" which is independent of orderedLibs. If > we base this on ServiceLoader, which seems to be the intent, the > algorithm would be:
Nope. See the discussion on the users list. There is a clear need for container defined SCIs to be executed first and there is nothing (yet) in the Servlet spec that places any constraints on SCI execution order. Mark > > if (orderedLibs != null) excludedJars = URLs of all jars in > WEB-INF/lib that are not listed in orderedLibs for (URL configFile > : webappLoader.getResources()) { if (!excludedJars.contains(jar > containing configFile)) { load SCIs from entries in configFile } } > > I originally shied away from trying to compare the URLs returned by > the classloader and with those from ServletContext.getResource() as > I was was not sure they would be the same. If they are, then the > implementation can be simplified along the lines above. If not, we > would also need to pass in the delegation order of the classloader > to know whether to add the "application" SCIs before or after the > "container" ones. > > I'll go ahead and modify this based on the assumption the URLs can > be compared. > > Cheers Jeremy > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org