kamranzafar / JCL

Jar Class Loader, a configurable and dynamic custom classloader designed to create, manage and manipulate isolated Java classloaders in IoC frameworks and web applications.
http://kamranzafar.github.com/
579 stars 161 forks source link

Fix deadlock issue in #50 #61

Open elbakramer opened 6 years ago

elbakramer commented 6 years ago

This addresses issue #50

Main idea is from @fxgendrin in the issue #50

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

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.

sandrocsimas commented 6 years ago

The same problem here. It seems that the DEV is not active on this project anymore =(