-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Rasmus,
On 10/2/2009 4:30 PM, Rasmus Larsen wrote: > I've created a custom class loader, which first first tries to load > classes from a specific set of jars, and if that fails it just loads > the class in the standard manner. This makes it possible to ensure > that a specific set of jar files are always used first. This solves my > problem. > > However, I was wondering if there was an easier way. FWIW, I would generalize the ClassLoader a bit so that it treats the JARs uniformly. For instance, always search for classes in the JARs in order alphabetically by JAR file name (but not path). That way, you can name your JARs like "1_log4j.jar" and "2_other_log4j.jar" or whatever. It wasn't entirely clear how you implemented your ClassLoader but it sounded like it might be /very/ specific to your exact requirements, today. Doing something like alphabetical resolution by file name might be re-usable in some other insane environment. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrPqN8ACgkQ9CaO5/Lv0PBLeQCffqFtEir44arwerzOUf36Vyo+ 9EoAn0hw6cytspxELVKAkEe/idvuGpq6 =LvcO -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org