Jar Class Loader, a configurable and dynamic custom classloader designed to create, manage and manipulate isolated Java classloaders in IoC frameworks and web applications.
Need a new release with following modification in AbstractClassLoader (as suggested in comment, but need to be compatible only with java 1.6, alternative is to duplicate ConcurrentSkipListSet into the project)
protected final Set<ProxyClassLoader> loaders = new ConcurrentSkipListSet<ProxyClassLoader>();
Besides the original proposal, there are some minor tweaks
Used backport implementation of java.util.concurrent in order to support java 1.5+, while some of the required classes are available since 1.6
To prevent loaders becoming Set from List, introduced thin wrapper(SetList) that wraps Set as List
Removed synchronized related codes/blocks because now java.util.concurrent handles the concurrent access/modification.
Checked that all existing tests are passing. But cannot think of a way to test properly that this really resolves the problem at hand.
Actually, my first choice was to ignore java 1.5+ support and just to use java.util.concurrent package. I tried that in my use case and it seemed to work as I expected.
This addresses issue #50
Main idea is from @fxgendrin in the issue #50
Besides the original proposal, there are some minor tweaks
java.util.concurrent
in order to support java 1.5+, while some of the required classes are available since 1.6loaders
becomingSet
fromList
, introduced thin wrapper(SetList
) that wrapsSet
asList
synchronized
related codes/blocks because nowjava.util.concurrent
handles the concurrent access/modification.Checked that all existing tests are passing. But cannot think of a way to test properly that this really resolves the problem at hand.
Actually, my first choice was to ignore java 1.5+ support and just to use
java.util.concurrent
package. I tried that in my use case and it seemed to work as I expected.