[ImageJ-devel] ThreadContextClassLoader Article

Curtis Rueden ctrueden at wisc.edu
Wed Nov 10 13:37:42 CST 2010


Hi Grant,

An interesting article on classloading and modules.
>
> http://wiki.apidesign.org/wiki/ThreadContextClassLoader
>

So, this article would only be relevant if we deploy ImageJ via an OSGi
framework, right?

I am wary of embracing the OSGi class loading mechanism, since I don't know
many compelling reasons to do so in our case—bundle-level visibility is the
only one I can think of at the moment. In general, I think multiple class
loaders are often unnecessary. Ultimately I would like to use the system
class loader as much as possible, rather than custom class loaders.

However, one big reason for multiple class loaders is to allow reloading of
plugins on the fly, without restarting the JVM. My understanding is that
this is the main reason ImageJ has a custom class loader
(ij.io.PluginClassLoader).

Out of curiosity, does anyone here have experience using JarClassLoader
(JCL)? On first glance it looks like it might be able to solve the class
reloading issue.
  http://jcloader.sourceforge.net/index.html

-Curtis

On Wed, Nov 10, 2010 at 8:55 AM, Grant B. Harris <gharris at mbl.edu> wrote:

> An interesting article on classloading and modules.
>
> http://wiki.apidesign.org/wiki/ThreadContextClassLoader
>
> - Grant
>
>
> _______________________________________________
> ImageJ-devel mailing list
> ImageJ-devel at imagejdev.org
> http://imagejdev.org/mailman/listinfo/imagej-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20101110/6575bb5d/attachment.html>


More information about the ImageJ-devel mailing list