Skip to content
This repository has been archived by the owner on Oct 5, 2018. It is now read-only.

A classloader for Tomcat 8 which loads the jars of WEB-INF lib in alphabetical order

License

Notifications You must be signed in to change notification settings

openwide-java/tomcat-classloader-ordered

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discontinued

This repository is no longer actively maintained. You may fork it if need be.

tomcat-classloader-ordered

A classloader for Apache Tomcat 8 which loads the jars of WEB-INF lib in alphabetical order.

Prior to version 8, Apache Tomcat loaded the jars of the WEB-INF lib directory in alphabetical order. Starting with version 8, the order is not predictable anymore and can lead to erratic behaviors, especially when deploying applications in a clustered environment.

This classloader delegates all its operation to the original Tomcat classloader with the only difference that it loads the jars in alphabetical order, guaranteeing a reproducible deployment.

The code is very simple and should be (hopefully!) bug free.

Compatibility

This classloader should be compatible with Apache Tomcat 8.0.x and 8.5.x.

How to use

You need to put the jar in Tomcat's lib directory.

Then, you need to add a src/main/webapp/META-INF/context.xml (supposing you use Maven but you get the idea) to your project:

<?xml version="1.0" encoding="UTF-8" ?>
<Context>
	<Loader loaderClass="fr.openwide.tomcat.catalina.loader.WebappOrderedClassLoader" />
	<Resources className="fr.openwide.tomcat.catalina.loader.OrderedStandardRoot"/>
</Context>

That's all!

License

This project is licensed under the Apache License version 2.0.

About

A classloader for Tomcat 8 which loads the jars of WEB-INF lib in alphabetical order

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages