JBoss Community

Re: Lazy modules resolving / linking

created by David Lloyd in JBoss AS7 Development - View the full discussion

OSGi dynamic import is implemented using a "fallback loader", which basically gets queried whenever a class or package is unknown to the loader.

 

You could use the same idea for lazy loading.  In your fallback loader, attempt to load the corresponding module.  If it succeeds, add it as a dependency to the Module, and then relink the module; then retry the load.

Reply to this message by going to Community

Start a new discussion in JBoss AS7 Development at Community