DynamicRepositoryClassLoader
class extends the {@link org.apache.jackrabbit.classloader.RepositoryClassLoader} and provides thefunctionality to load classes and resources from the JCR Repository. Additionally, this class supports the notion of getting 'dirty', which means, that if a resource loaded through this class loader has been modified in the Repository, this class loader marks itself dirty, which flag can get retrieved. This helps the user of this class loader to decide on whether to {@link #reinstantiate(Session,ClassLoader) reinstantiate} it or continueusing this class loader. When a user of the class loader recognizes an instance to be dirty, it can easily be reinstantiated with the {@link #reinstantiate} method. Thisreinstantiation will also rebuild the internal real class path from the same list of path patterns as was used to create the internal class path for the original class loader. The resulting internal class path need not be the same, though.
As an additional feature the class loaders provides the functionality for complete reconfiguration of the list of path patterns defined at class loader construction time through the {@link #reconfigure(String[])} method. Thisreconfiguration replaces the internal class path with a new one built from the new path list and also replaces that path list. Reinstantiating a reconfigured class loader gets a class loader containing the same path list as the original class loader had after reconfiguration. That is the original configuration is lost. While reconfiguration is not able to throw away classes already loaded, it will nevertheless mark the class loader dirty, if any classes have already been loaded through it.
This class is not intended to be extended by clients. @author Felix Meschberger
|
|
|
|