Package javax.enterprise.deploy.spi

Examples of javax.enterprise.deploy.spi.Target


            throw new DeploymentException("This command cannot be run unless connecting to a running server.  Specify --url if server is not running on the default port on localhost.");
        }
        Target[] list = connection.getDeploymentManager().getTargets();
        out.println("Available Targets:");
        for(int i = 0; i < list.length; i++) {
            Target target = list[i];
            out.println("  "+target.getName());
        }
    }
View Full Code Here


        for (int i = 0; i < tlist.length; i++) {
            if(found.contains(targetNames.get(i))) {
                throw new DeploymentException("Target list should not contain duplicates ("+targetNames.get(i)+")");
            }
            for (int j = 0; j < all.length; j++) {
                Target server = all[j];
                if(server.getName().equals(targetNames.get(i))) {
                    tlist[i] = server;
                    found.add(server.getName());
                    break;
                }
            }
            if(tlist[i] == null) {
                throw new DeploymentException("No target named '"+targetNames.get(i)+"' was found");
View Full Code Here

            } else {
                moduleId = module;
                webUrl = null;
            }

            Target target = getTargetFor(moduleId);
            if (target != null) {
                if (moduleId.startsWith(target.getName())) {
                    moduleId = moduleId.substring(target.getName().length());
                }
            } else {
                target = defaultTarget;
            }
View Full Code Here

        for (int i = 0; i < tlist.length; i++) {
            if(found.contains(targetNames.get(i))) {
                throw new DeploymentException("Target list should not contain duplicates ("+targetNames.get(i)+")");
            }
            for (int j = 0; j < all.length; j++) {
                Target server = all[j];
                if(server.getName().equals(targetNames.get(i))) {
                    tlist[i] = server;
                    found.add(server.getName());
                    break;
                }
            }
            if(tlist[i] == null) {
                throw new DeploymentException("No target named '"+targetNames.get(i)+"' was found");
View Full Code Here

                    targetModuleIDList.add(targetModuleID);
                }
            }

            // then undeploy from last target
            Target lastTarget = targets[targets.length -1];
            undeploymentOptions.put(DFDeploymentProperties.TARGET, lastTarget.getName());
            DFCommandRunner commandRunner2 = getDFCommandRunner(
                    "undeploy",
                    undeploymentOptions,
                    new String[]{moduleID});
            DFDeploymentStatus ds2 = commandRunner2.run();
            DFDeploymentStatus mainStatus2 = ds2.getMainStatus();
            if (!po.checkStatusAndAddStage((TargetImpl)lastTarget, localStrings.getLocalString("enterprise.deployment.client.undeploy_from_target", "Trying to undeploy application from target {0}", lastTarget.getName()), mainStatus2)) {
                return po;
            }

            TargetModuleIDImpl targetModuleID =
                new TargetModuleIDImpl((TargetImpl)lastTarget, moduleID);
View Full Code Here

                    targetModuleIDList.add(targetModuleID);
                }
            }

            // then undeploy from last target
            Target lastTarget = targets[targets.length -1];
            undeploymentOptions.put(DFDeploymentProperties.TARGET, lastTarget.getName());
            DFCommandRunner commandRunner2 = getDFCommandRunner(
                    "undeploy",
                    undeploymentOptions,
                    new String[]{moduleID});
            DFDeploymentStatus ds2 = commandRunner2.run();
            DFDeploymentStatus mainStatus2 = ds2.getMainStatus();
            if (!po.checkStatusAndAddStage((TargetImpl)lastTarget, localStrings.getLocalString("enterprise.deployment.client.undeploy_from_target", "Trying to undeploy application from target {0}", lastTarget.getName()), mainStatus2)) {
                return po;
            }

            TargetModuleIDImpl targetModuleID =
                new TargetModuleIDImpl((TargetImpl)lastTarget, moduleID);
View Full Code Here

            for (int i = 0; i < targetModuleIDs.length; i++) {
                /*
                 *Make sure that this target module ID has a target that is a TargetImpl and was created by this DM.
                 */
                Target candidateTarget = targetModuleIDs[i].getTarget();
                if ( ! (candidateTarget instanceof TargetImpl)) {
                    throw new IllegalArgumentException(
                    localStrings.getLocalString("enterprise.deployapi.spi.nott", //NOI18N
                        "Expected TargetImpl instance but found instance of {0}", new Object[] {candidateTarget.getClass().getName() } )); //NOI18N
                }
                String moduleID = targetModuleIDs[i].getModuleID();
               
                /*
                 *Look for the entry in the hash map for this module.
View Full Code Here

            } else {
                moduleId = module;
                webUrl = null;
            }

            Target target = getTargetFor(moduleId);
            if (target != null) {
                if (moduleId.startsWith(target.getName())) {
                    moduleId = moduleId.substring(target.getName().length());
                }
            } else {
                target = defaultTarget;
            }
View Full Code Here

    public void execute(PrintWriter out, ServerConnection connection, String[] args) throws DeploymentException {
        Target[] list = connection.getDeploymentManager().getTargets();
        out.println("Available Targets:");
        for(int i = 0; i < list.length; i++) {
            Target target = list[i];
            out.println("  "+target.getName());
        }
    }
View Full Code Here

        for (int i = 0; i < tlist.length; i++) {
            if(found.contains(targetNames.get(i))) {
                throw new DeploymentException("Target list should not contain duplicates ("+targetNames.get(i)+")");
            }
            for (int j = 0; j < all.length; j++) {
                Target server = all[j];
                if(server.getName().equals(targetNames.get(i))) {
                    tlist[i] = server;
                    found.add(server.getName());
                    break;
                }
            }
            if(tlist[i] == null) {
                throw new DeploymentException("No target named '"+targetNames.get(i)+"' was found");
View Full Code Here

TOP

Related Classes of javax.enterprise.deploy.spi.Target

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.