Examples of TargetModuleID


Examples of javax.enterprise.deploy.spi.TargetModuleID

  {
    try {
      StringBuilder sb = new StringBuilder();

      for (int i = 0; i < moduleIDList.length; i++) {
        TargetModuleID targetModuleID = moduleIDList[i];

        String host = targetModuleID.getTarget().getName();
        String tag = targetModuleID.getModuleID();

        _deployClient.start(tag);

        sb.append(tag).append(' ');
      }
View Full Code Here

Examples of javax.enterprise.deploy.spi.TargetModuleID

  {
    try {
      StringBuilder sb = new StringBuilder();

      for (int i = 0; i < moduleIDList.length; i++) {
        TargetModuleID targetModuleID = moduleIDList[i];

        String host = targetModuleID.getTarget().getName();
        String tag = targetModuleID.getModuleID();

        _deployClient.stop(tag);

        sb.append(tag).append(' ');
      }
View Full Code Here

Examples of javax.enterprise.deploy.spi.TargetModuleID

  {
    try {
      StringBuilder sb = new StringBuilder();

      for (int i = 0; i < moduleIDList.length; i++) {
        TargetModuleID targetModuleID = moduleIDList[i];

        String host = targetModuleID.getTarget().getName();
        String tag = targetModuleID.getModuleID();
       
        CommitBuilder builder = new CommitBuilder();
        builder.type("webapp");
        builder.tagKey(tag);
View Full Code Here

Examples of javax.enterprise.deploy.spi.TargetModuleID

                } else {
                    log.warn("Unable to start some modules for " + file.getAbsolutePath());
                }
                modules = po.getResultTargetModuleIDs();
                for (int i = 0; i < modules.length; i++) {
                    TargetModuleID result = modules[i];
                    log.info(DeployUtils.reformat("Deployed " + result.getModuleID() + (targets.length > 1 ? " to " + result.getTarget().getName() : "") + (result.getWebURL() == null ? "" : " @ " + result.getWebURL()), 4, 72));
                    if (result.getChildTargetModuleID() != null) {
                        for (int j = 0; j < result.getChildTargetModuleID().length; j++) {
                            TargetModuleID child = result.getChildTargetModuleID()[j];
                            log.info(DeployUtils.reformat("  `-> " + child.getModuleID() + (child.getWebURL() == null ? "" : " @ " + child.getWebURL()), 4, 72));
                        }
                    }
                }
            } else {
               //Try to delete the module , that failed to successfully hot-deploy 
View Full Code Here

Examples of javax.enterprise.deploy.spi.TargetModuleID

            ProgressObject po = mgr.undeploy(ids);
            waitForProgress(po);
            if (po.getDeploymentStatus().isCompleted()) {
                TargetModuleID[] modules = po.getResultTargetModuleIDs();
                for (int i = 0; i < modules.length; i++) {
                    TargetModuleID result = modules[i];
                    log.info(DeployUtils.reformat("Undeployed " + result.getModuleID() + (targets.length > 1 ? " to " + result.getTarget().getName() : ""), 4, 72));
                }
            } else {
                log.error("Unable to undeploy " + file.getAbsolutePath() + "(" + configId + ")" + po.getDeploymentStatus().getMessage());
                return false;
            }
View Full Code Here

Examples of javax.enterprise.deploy.spi.TargetModuleID

            }
            waitForProgress(po);
            if (po.getDeploymentStatus().isCompleted()) {
                modules = po.getResultTargetModuleIDs();
                for (int i = 0; i < modules.length; i++) {
                    TargetModuleID result = modules[i];
                    log.info(DeployUtils.reformat("Redeployed " + result.getModuleID() + (targets.length > 1 ? " to " + result.getTarget().getName() : "") + (result.getWebURL() == null ? "" : " @ " + result.getWebURL()), 4, 72));
                    if (result.getChildTargetModuleID() != null) {
                        for (int j = 0; j < result.getChildTargetModuleID().length; j++) {
                            TargetModuleID child = result.getChildTargetModuleID()[j];
                            log.info(DeployUtils.reformat("  `-> " + child.getModuleID() + (child.getWebURL() == null ? "" : " @ " + child.getWebURL()), 4, 72));
                        }
                    }
                }
            } else {
                log.error("Unable to undeploy " + file.getAbsolutePath() + "(" + configId + ")" + po.getDeploymentStatus().getMessage());
View Full Code Here

Examples of javax.enterprise.deploy.spi.TargetModuleID

    public void run() {
        try {
            ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
            try {
                for (int i = 0; i < modules.length; i++) {
                    TargetModuleID module = modules[i];

                    // Check to see whether the module is already started
                    Artifact moduleID = Artifact.create(module.getModuleID());
                    if (configurationManager.isRunning(moduleID)) {
                        updateStatus("Module " + moduleID + " is already running");
                        Thread.sleep(100);
                        continue;
                    }

                    // Load
                    if(!configurationManager.isLoaded(moduleID)) {
                        configurationManager.loadConfiguration(moduleID);
                    }

                    // Start
                    org.apache.geronimo.kernel.config.LifecycleResults lcresult = configurationManager.startConfiguration(moduleID);

                    // Determine the child modules of the configuration
                    //TODO might be a hack
                    List kids = loadChildren(kernel, moduleID.toString());

                    // Build a response obect containg the started configuration and a list of it's contained modules
                    TargetModuleIDImpl id = new TargetModuleIDImpl(modules[i].getTarget(), module.getModuleID(),
                            (String[]) kids.toArray(new String[kids.size()]));
                    if (isWebApp(kernel, moduleID.toString())) {
                        id.setType(ModuleType.WAR);
                    }
                    if (id.getChildTargetModuleID() != null) {
View Full Code Here

Examples of javax.enterprise.deploy.spi.TargetModuleID

            ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
            int alreadyStopped = 0;

            try {
                for (int i = 0; i < modules.length; i++) {
                    TargetModuleID module = modules[i];
                    Artifact moduleID = Artifact.create(module.getModuleID());
                    org.apache.geronimo.kernel.config.LifecycleResults lcresult = null;

                    if (configurationManager.isRunning(moduleID)) {
                        lcresult = configurationManager.stopConfiguration(moduleID);
                        addModule(module);
                    } else {
                        updateStatus("Module " + moduleID + " is already stopped");
                        alreadyStopped++;
                    }

                    if (configurationManager.isLoaded(moduleID)) {
                        configurationManager.unloadConfiguration(moduleID);
                    }

                    if (lcresult != null) {
                        java.util.Iterator iterator = lcresult.getStopped().iterator();
                        while (iterator.hasNext()) {
                            Artifact config = (Artifact)iterator.next();
                            if (!config.toString().equals(module.getModuleID())) {
                                //TODO might be a hack
                                List kidsChild = loadChildren(kernel, config.toString());
                                //this.updateStatus("printing kidsChild="+kidsChild);
                                //this.updateStatus("printing config="+config.toString());
                                // Build a response obect containg the started configuration and a list of it's contained modules
View Full Code Here

Examples of javax.enterprise.deploy.spi.TargetModuleID

        List modulesList = new ArrayList();

        DeploymentManager manager = getDeploymentManager();

        Target[] targets = manager.getTargets();
        TargetModuleID runningModuleIds[] = manager.getRunningModules(null, targets);

        for (int j = 0; j < moduleIds.length; j++) {
            String moduleId = moduleIds[j].getModuleID();
            log.debug("Checking if module is running: " + moduleId);
View Full Code Here

Examples of javax.enterprise.deploy.spi.TargetModuleID

        log.debug("Checking if module is started: " + moduleId);
       
        DeploymentManager manager = getDeploymentManager();

        Target[] targets = manager.getTargets();
        TargetModuleID targetIds[] = manager.getRunningModules(null, targets);

        for (int i = 0; i < targetIds.length; i++) {
            if (moduleId.equals(targetIds[i].getModuleID())) {
                return true;
            }
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.