This topic explains Classloader Isolation in VMware Tanzu GemFire.
Classloader Isolation is enabled by default.
Members started through gfsh
are automatically started with classloader isolation. You can disable classloader by using the --disable-classloader-isolation
option on the start
command. See Disable Classloader Isolation.
With classloader isolation, Tanzu GemFire’s classes are loaded into one module and user deployed jars and extensions are each deployed into their own modules. Additional class path entries provided to the start
command by the --classpath
option are also loaded into a separate module. Each module contains its own classloader.
Modules can access classes from other classloaders, but will first attempt to resolve classes internally, avoiding conflicts with other modules which may contain different versions of the same classes.
Loaded classloader modules and the relationships between them are logged out at member startup and when and modules are loaded or unloaded.
In most circumstances, there should be no change in behavior when using classloader isolation, but there are differences:
--include-system-classpath
option is not valid when using classloader isolation.In some situations or for diagnostic purposes, you may need to start GemFire processes without support for classloader isolation and extensions. For each process for which you want to disable classloader isolation, run the corresponding command from the sections below. These commands set flags for the processes.
Setting one of these flags prevents the process from loading any GemFire extension, like GemFire Search or GemFire for Redis Apps. Additionally, classloader isolation is removed from the process and all libraries are added to the system class path, similar to previous releases of GemFire.
To start gfsh
without classloader isolation and extensions, run:
DISABLE_CLASSLOADER_ISOLATION=true /path/to/gfsh
To start locators without classloader isolation and extensions, run:
gfsh>start locator ... --disable-classloader-isolation
To start servers without classloader isolation and extensions,run:
gfsh>start server ... --disable-classloader-isolation