XmlBlaster Logo

REQUIREMENT

util.classloader.ClassLoaderFactory

XmlBlaster Logo


Type NEW
Priority MEDIUM
Status CLOSED
Topic XmlBlaster provides a pluggable ClassLoaderFactory to create instances of xmlBlaster specific classloaders.
Des
cription

The ClassLoaderFactory is an interface specifying factory methods to get classloaders for loading XmlBlaster classes and plugin classes. The factory is pluggable by using the property classLoaderFactory and is acceable through org.xmlBlaster.util.Global.getClassLoaderFactory().

One and only one ClassLoaderFactory instance will be created per Global instance.

StandaloneClassLoaderFactory

The default implementation used is StandaloneClassLoaderFactory wich tries to manipulate the classpath of the running JVM, and especially honours the classpath property of plugins. This is typically used in standalone mode.This classloader strategy may however be problematic when running XmlBlaster embedded in other appservers, therefore other strategies exists.

ContextClassLoaderFactory

The ContextClassLoaderFactory will return the current context classloader to load both XmlBlaster classes and plugins. In some cases it works better in embedded environments. Its important to note however that the classpath property of plugins are not used by this factory.

Configure
Property Example Description Implemented
classLoaderFactory org.xmlBlaster.util.classloader.ContextClassLoaderFactory Use another ClassLoaderFactory than StandaloneClassLoaderFactory yes

NOTE: Configuration parameters are specified on command line (-someValue 17) or in the xmlBlaster.properties file (someValue=17). See requirement "util.property" for details.
Columns named Impl tells you if the feature is implemented.
Columns named Hot tells you if the configuration is changeable in hot operation.

Todo
   Write some TestCase!
   
See REQ util.classloader.XmlBlasterClassLoader
See REQ util.classloader.PluginClassLoader
See API org.xmlBlaster.util.classloader.ClassLoaderFactory
See API org.xmlBlaster.util.classloader.StandaloneClassLoaderFactory
See API org.xmlBlaster.util.classloader.ContextClassLoaderFactory
See API org.xmlBlaster.util.classloader.XmlBlasterClassLoader
See API org.xmlBlaster.util.classloader.PluginClassLoader

This page is generated from the requirement XML file xmlBlaster/doc/requirements/util.classloader.ClassLoaderFactory.xml

Back to overview