ClassLoading, differently

It's not quite ready for prime-time, I don't think, but James Strachan already blogged me, so I might as well blog myself. I've started classworlds, a new project to hopefully help rid ourselves of classloader psychosis once and for all.

It effectively turns the ClassLoader tree hierarchy into a directed graph of ClassLoaders. Effectively, a ClassLoader can have multiple 'parents' from which it can load classes. The relationship between ClassLoaders can be constrained to only allow classes belonging to certain packages to be loaded across ClassLoaders. Effectively, you get fine-grained firewalling with a sort of mix-in flavor to it.

classworlds is a framework for container developers who require complex manipulation of Java's ClassLoaders. Java's native ClassLoader mechanims and classes can cause much headache and confusion for certain types of application developers. Projects which involve dynamic loading of components or otherwise represent a 'container' can benefit from the classloading control provided by classworlds.

classworlds provides a richer set of semantics for class loading than Java's normal mechanisms, while still being able to provide a ClassLoader interface to integrate seamlessly with the Java environment.

The classworlds model does away with the hierarchy normally associated with ClassLoaders. Instead, there is a pool of ClassRealms which can import arbitrary packages from other ClassRealms. Effectively, classworlds turns the old-style hierarchy into a directed graph.

About this Entry

This page contains a single entry by bob published on September 24, 2002 4:05 AM.

Classloading was the previous entry in this blog.

classworlds-1.0-beta-1 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.