On Sep 19, 2013, at 8:31 AM, Jeremy Boynes <jboy...@apache.org> 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: > > 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. Patch that changes this to load in the order returned by the ClassLoader
sci.patch
Description: Binary data
signature.asc
Description: Message signed with OpenPGP using GPGMail