Examples of DownloadResults


Examples of org.apache.geronimo.system.plugin.DownloadResults

    }

    public void installPlugins(GeronimoDeploymentManager mgr, PluginListType list, String defaultRepository, ConsoleReader consoleReader, ServerConnection connection) throws IOException, DeploymentException {
        long start = System.currentTimeMillis();
        Object key = mgr.startInstall(list, defaultRepository, false, null, null);
        DownloadResults results = CommandInstallCAR.showProgress(consoleReader, mgr, key);
        int time = (int) (System.currentTimeMillis() - start) / 1000;
        CommandInstallCAR.printResults(consoleReader, results, time);
    }
View Full Code Here

Examples of org.apache.geronimo.system.plugin.DownloadResults

        return installList;
    }

    public void assembleServer(GeronimoDeploymentManager mgr, PluginListType list, String repositoryPath, String relativeServerPath, ConsoleReader consoleReader) throws Exception {
        long start = System.currentTimeMillis();
        DownloadResults results = mgr.installPluginList(repositoryPath, relativeServerPath, list);
        int time = (int) (System.currentTimeMillis() - start) / 1000;
        CommandInstallCAR.printResults(consoleReader, results, time);
    }
View Full Code Here

Examples of org.apache.geronimo.system.plugin.DownloadResults

            jpaNodeInfo = clusterContext.getNodeInfo(cluster, nodeInfo);
            clusterContext.close();
        }
        Map<String, DownloadResults> installedPluginLists = new HashMap<String, DownloadResults>();
        for (JpaPluginList pluginList : cluster.getPluginLists()) {
            DownloadResults downloadResults = installToNode(pluginList, jpaNodeInfo);
            installedPluginLists.put(pluginList.getName(), downloadResults);
        }
        return installedPluginLists;
    }
View Full Code Here

Examples of org.apache.geronimo.system.plugin.DownloadResults

    }

    private Map<String, DownloadResults> installToCluster(JpaPluginList pluginList, JpaClusterInfo cluster) {
        Map<String, DownloadResults> installedNodes = new HashMap<String, DownloadResults>();
        for (JpaNodeInfo jpaNodeInfo : cluster.getJpaNodeInfos()) {
            DownloadResults downloadResults = installToNode(pluginList, jpaNodeInfo);
            installedNodes.put(jpaNodeInfo.getName(), downloadResults);
        }
        return installedNodes;
    }
View Full Code Here

Examples of org.apache.geronimo.system.plugin.DownloadResults

            PluginInstaller pluginInstaller = jpaNodeInfo.getPluginInstaller();
            PluginListType pluginList = jpaPluginList.getPluginList();
            //TODO parameterize restrictToDefaultRepository
            return pluginInstaller.install(pluginList, defaultRepository, false, null, null);
        } catch (IOException e) {
            DownloadResults downloadResults = new DownloadResults();
            downloadResults.setFailure(e);
            return downloadResults;
        }
    }
View Full Code Here

Examples of org.apache.geronimo.system.plugin.DownloadResults

    }

    private Map<String, DownloadResults> removeFromCluster(List<JpaPluginInstance> pluginList, JpaClusterInfo cluster) {
        Map<String, DownloadResults> installedNodes = new HashMap<String, DownloadResults>();
        for (JpaNodeInfo jpaNodeInfo : cluster.getJpaNodeInfos()) {
            DownloadResults downloadResults = removeFromNode(pluginList, jpaNodeInfo);
            installedNodes.put(jpaNodeInfo.getName(), downloadResults);
        }
        return installedNodes;
    }
View Full Code Here

Examples of org.apache.geronimo.system.plugin.DownloadResults

        }
        return installedNodes;
    }

    private DownloadResults removeFromNode(List<JpaPluginInstance> pluginList, JpaNodeInfo jpaNodeInfo) {
        DownloadResults downloadResults = new DownloadResults();
        try {
            ConfigurationManager configurationManager = jpaNodeInfo.getConfigurationManager();
            for (JpaPluginInstance jpaPluginInstance: pluginList) {
                Artifact artifact = jpaPluginInstance.toArtifact();
                configurationManager.uninstallConfiguration(artifact);
                downloadResults.addRemovedConfigID(artifact);
            }
        } catch (IOException e) {
            downloadResults.setFailure(e);
        } catch (NoSuchConfigException e) {
            downloadResults.setFailure(e);
        }
        return downloadResults;
    }
View Full Code Here

Examples of org.apache.geronimo.system.plugin.DownloadResults

        nodeInfo.setConnectorInfo("system", "manager", "rmi", "localhost", 1099 + 10 * serverId, "JMXConnector", false);
        Map<String, DownloadResults> results = farmGBean.addNode(CLUSTER1, nodeInfo);
        if (results.size() != 1) {
            throw new IllegalStateException("wrong number of nodes installed to" + results.size());
        }
        DownloadResults downloadResults = results.get(PLUGIN_LIST1);
        if (downloadResults.isFailed()) {
            throw new IllegalStateException("failed to install on node1", downloadResults.getFailure());
        }
    }
View Full Code Here

Examples of org.apache.geronimo.system.plugin.DownloadResults

        }
    }

    static DownloadResults waitTillDone(GeronimoDeploymentManager mgr, Object key) throws MojoExecutionException {
        while (true) {
            DownloadResults results = mgr.checkOnInstall(key);
            if (results.isFinished()) {
                if (results.isFailed()) {
                    throw new MojoExecutionException("Failed to install plugin");
                }
                return results;
            }
            try {
View Full Code Here

Examples of org.apache.geronimo.system.plugin.DownloadResults

        PluginListType list = getServerPluginList(request, pluginInstaller);
        PluginListType installList = getPluginsFromIds(configIds, list);
       

        try {
            DownloadResults downloadResults = pluginInstaller.installPluginList("repository", relativeServerPath, installList);
            archiver.archive(relativeServerPath, "var/temp", new Artifact(groupId, artifactId, version, format));
        } catch (Exception e) {
            throw new PortletException("Could not assemble server", e);
        }
        return ASSEMBLY_CONFIRM_MODE+BEFORE_ACTION;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.