[jboss-dev-forums] [JBoss Microcontainer Development] - New features in classloading

adrian@jboss.org do-not-reply at jboss.com
Wed Nov 18 12:18:30 EST 2009


I've started committing some work on adding the missing OSGi features to jboss-cl.

The first couple are complete:

JBCL-127 - adds a notion of ClassNotFoundHandler. This allows a handler to intercept
a dynamic classloading request and resolve (or even install - see below) the missing classes.

JBCL-128 - adds some notifications. The most important of these is the class found
notification used in the "lazy start" - see below.

The others are still prototypes and need to properly integrated with the deployers/osgi
As part of this, I've introduced the notion of a LifeCycle to the classloading Module.

This allows us to invoke callbacks (when requested) on the Deployment or whatever
is the component model for the classloader.

JBCL-130 - lazy start - is a generalisation of lazy activation from osgi
where a deployment can be left in the classloader stage until somebody loads
a class from it

JBCL-131 - lazy resolve - implements the osgi feature where a classloader is not
even constructed unless someone "imports" one of its packages

JBCL-132 - resolver - this is a general api that will allow things like OBR to be
hooked it. But it could also be used to for example to download dependencies from
a maven repository when they are requested.

Part of the LifeCycle includes notification of ClassLoader create/destroy
which was something missing in our OSGi Bundle resolve notifications.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266362#4266362

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266362



More information about the jboss-dev-forums mailing list