The Virgo kernel's ExtensionsHookConfigurator class registers various Equinox hooks:
- a class loading hook, PluggableClassLoadingHook, which is used to set a custom class loader KernelBundleClassLoader which in turn implements the InstrumentableClassLoader interface and thereby enables load time weaving and the construction of "throw away" class loaders for instrumentation purposes.
- the following bundle file wrapper factory hooks:
- ExtendedBundleFileWrapperFactoryHook which wraps the Equinox BundleFile class to ensure that all returned resource URLs have the file: protocol rather than the bundleresource: protocol which is the Equinox default.
- BundleFileClosingBundleFileWrapperFactoryHook which worked around Equinox " bug 404390. This bug is now fixed, so it may be possible to delete this hook.
- PluggableBundleFileWrapperFactoryHook which is used by the Virgo kernel to wrap BundleFile with TransformedManifestProvidingBundleFileWrapper which replaces the manifest in the BundleFile with one that has been transformed in memory by the deployment pipeline.
- a class loader delegate hook PluggableDelegatingClassLoaderDelegateHook which is used by the Virgo kernel in postFindResource and postFindResources to propagate any attempts to get META-INF resource(s) to the principal bundle's dependencies, unless the request is being driven through Gemini Blueprint's DelgatedNamespaceHandlerResolver which is exempted from such propagation.
Note that the Virgo kernel's hooks are registered by EquinoxHookRegistrar.
There are two class loading hooks in the Virgo web layer: AppLoaderClasspathExtenderClassLoadingHook and OpenEjbEmptyProtectionDomainClassloadingHook.