Package org.hotswap.agent.config

Examples of org.hotswap.agent.config.PluginConfiguration


        if (appClassLoader.getClass().getName().equals("org.apache.catalina.loader.WebappClassLoader")) {
            registeredResourcesMap.put(resource, appClassLoader);

            // create plugin configuration in advance to get extraClasspath and watchResources properties
            PluginConfiguration pluginConfiguration = new PluginConfiguration(appClassLoader);

            WatchResourcesClassLoader watchResourcesClassLoader = new WatchResourcesClassLoader(false);

            URL[] extraClasspath = pluginConfiguration.getExtraClasspath();
            if (extraClasspath.length > 0) {
                if (majorVersion > 7)
                    watchResourcesClassLoader.initExtraPath(extraClasspath);
                else
                    addRepositoriesAtStart(appClassLoader, extraClasspath, false);

            }

            URL[] watchResources = pluginConfiguration.getWatchResources();
            if (watchResources.length > 0) {
                if (majorVersion > 7)
                    watchResourcesClassLoader.initWatchResources(watchResources, PluginManager.getInstance().getWatcher());
                else
                    addRepositoriesAtStart(appClassLoader, watchResources, true);
            }

            // register special repo
            getExtraRepositories(appClassLoader).put(WEB_INF_CLASSES, watchResourcesClassLoader);

            // register special repo for webappDir
            URL webappDir = pluginConfiguration.getWebappDir();
            if (webappDir != null) {
                WatchResourcesClassLoader webappDirClassLoader = new WatchResourcesClassLoader(false);
                webappDirClassLoader.initExtraPath(new URL[] {webappDir});

                getExtraRepositories(appClassLoader).put("/", webappDirClassLoader);
View Full Code Here

TOP

Related Classes of org.hotswap.agent.config.PluginConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.