ta.apache.org/commons/sandbox/vfs/">Jakarta VFS. (Like local files, zip files etc.) - following the ScriptedContainerBuilderFactory scripting model. The root folder to deploy must have the following file structure:
+-someapp/ +-META-INF/ | +-nanocontainer.[py|js|xml|bsh] +-com/ +-blablah/ +-Hip.class +-Hop.class
For those familiar with J2EE containers (or other containers for that matter), the META-INF/picocontainer script is the ScriptedContainerBuilderFactory
composition script. It plays the same role as more classical "deployment descriptors", except that deploying via a full blown scripting language is a lot more powerful! A new class loader (which will be a child of parentClassLoader) will be created. This classloader will make the classes under the root folder available to the deployment script. IMPORTANT NOTE: The scripting engine (rhino, jython, groovy etc.) should be loaded by the same classLoader as the appliacation classes, i.e. the VFSClassLoader pointing to the app directory.
+-------------------+ | xxx | <-- parent app loader (must not contain classes from app builder classloader) +-------------------+ | +-------------------+ | someapp | <-- app classloader (must not contain classes from app builder classloader) +-------------------+ | +-------------------+ | picocontainer | | nanocontainer | <-- app builder classloader | rhino | | jython | | groovy | +-------------------+
This means that these scripting engines should *not* be accessible by any of the app classloader, since this may prevent the scripting engine from seeing the classes loaded by the VFSClassLoader. In other words, the scripting engine classed may be loaded several times by different class loaders - once for each deployed application.
@author Aslak Hellesøy