Wishlist

From OpenCms Wiki
Revision as of 11:25, 17 November 2006 by Cschoenfeld (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Custom ClassLoaders for Modules

OpenCms should provide its own ClassLoader for each module.

  • The Module ClassLoader is instantiated along with the module and used to load classes, classpath resources, JSPs and libraries contained in the module directly from VFS.
  • The classpath of a Module ClassLoader contains
    • /system/modules/<modulename>/classes/
    • /system/modules/<modulename>/lib/*.jar
  • Each time OpenCms detects that a file on the Module ClassLoader classpath changes, the Module ClassLoader is thrown away and a new instance is created.
  • Module dependencies build a Module ClassLoader hierarchy. If module B depends on module A, the Module ClassLoader of B has the Module ClassLoader of A as a parent, thereby making A's classpath available to B.

Benefits:

  • No need to export files from the VFS to WEB-INF/lib and WEB-INF/classes.
  • It is no longer required reload OpenCms for each change to a module classpath file.
  • Ability to use different and incompatible versions of libraries in different modules.
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox