Package org.apache.geronimo.deployment.plugin

Examples of org.apache.geronimo.deployment.plugin.TargetModuleIDImpl


        Target[] targets = manager.getTargets();
        TargetModuleID[] modules = manager.getAvailableModules(null, targets);
        List redeploy = new ArrayList();
        if (args.length > 1) {
            for (int i = 0; i < modules.length; i++) {
                TargetModuleIDImpl targetModuleID = (TargetModuleIDImpl)modules[i];
                if (targetModuleID.getModuleID().equals(args[1])) {
                    redeploy.add(targetModuleID);
                }
            }
        }
        if (redeploy.isEmpty()) {
View Full Code Here


    }

    public void run() {
        try {
            for (int i = 0; i < modules.length; i++) {
                TargetModuleIDImpl module = (TargetModuleIDImpl) modules[i];

                URI moduleID = URI.create(module.getModuleID());
                try {
                    kernel.stopConfiguration(moduleID);

                    TargetImpl target = (TargetImpl) module.getTarget();
                    ObjectName storeName = target.getObjectName();
                    URI configID = URI.create(module.getModuleID());
                    kernel.invoke(storeName, "uninstall", new Object[]{configID}, UNINSTALL_SIG);
                } catch (NoSuchConfigException e) {
                    // module was already undeployed - just continue
                }
View Full Code Here

                String[] childIDs = new String[objectNames.size()-1];
                for (int j=0; j < childIDs.length; j++) {
                    childIDs[j] = (String)objectNames.get(j+1);
                }

                TargetModuleID moduleID = new TargetModuleIDImpl(targetList[0], parentName.toString(), childIDs);
//                System.err.println("Distributed moduleId " + moduleID);
                addModule(moduleID);
            } else {
                DeploymentException deploymentException = new DeploymentException("Got empty list");
                deploymentException.printStackTrace();
View Full Code Here

            throw new UnsupportedOperationException("More than one deployer found");
        }

        try {
            for (int i = 0; i < modules.length; i++) {
                TargetModuleIDImpl module = (TargetModuleIDImpl) modules[i];

                URI configID = URI.create(module.getModuleID());
                kernel.stopConfiguration(configID);
               
                TargetImpl target = (TargetImpl) module.getTarget();
                ObjectName storeName = target.getObjectName();
                kernel.invoke(storeName, "uninstall", new Object[]{configID}, UNINSTALL_SIG);

                Object[] args = {moduleArchive, deploymentPlan};
                URI configId = (URI) kernel.invoke(deployer, "deploy", args, DEPLOY_SIG);
                module = new TargetModuleIDImpl(module.getTarget(), configId.toString());
                addModule(module);
            }
            complete("Completed");
        } catch (Exception e) {
            doFail(e);
View Full Code Here

                ObjectName storeName = target.getObjectName();
                List infos = kernel.listConfigurations(storeName);
                for (int j = 0; j < infos.size(); j++) {
                    ConfigurationInfo info = (ConfigurationInfo) infos.get(j);
                    if (filter.accept(info)) {
                        TargetModuleID moduleID = new TargetModuleIDImpl(target, info.getConfigID().toString());
                        result.add(moduleID);
                    }
                }
            }
            return result.size() == 0 ? null : (TargetModuleID[]) result.toArray(new TargetModuleID[result.size()]);
View Full Code Here

 
  /* (non-Javadoc)
   * @see org.apache.geronimo.st.core.IGeronimoVersionHandler#createTargetModuleId(java.lang.String)
   */
  public TargetModuleID createTargetModuleId(String configId) {
    return new TargetModuleIDImpl(null, configId);
  }
View Full Code Here

 
  /* (non-Javadoc)
   * @see org.apache.geronimo.st.core.IGeronimoVersionHandler#createTargetModuleId(java.lang.String)
   */
  public TargetModuleID createTargetModuleId(String configId) {
    return new TargetModuleIDImpl(null, configId);
  }
View Full Code Here

        Target[] targets = manager.getTargets();
        TargetModuleID[] modules = manager.getAvailableModules(null, targets);
        List redeploy = new ArrayList();
        if (args.length > 1) {
            for (int i = 0; i < modules.length; i++) {
                TargetModuleIDImpl targetModuleID = (TargetModuleIDImpl)modules[i];
                if (targetModuleID.getModuleID().equals(args[1])) {
                    redeploy.add(targetModuleID);
                }
            }
        }
        if (redeploy.isEmpty()) {
View Full Code Here

    }

    public void run() {
        try {
            for (int i = 0; i < modules.length; i++) {
                TargetModuleIDImpl module = (TargetModuleIDImpl) modules[i];

                URI moduleID = URI.create(module.getModuleID());
                kernel.stopConfiguration(moduleID);

                TargetImpl target = (TargetImpl) module.getTarget();
                ObjectName storeName = target.getObjectName();
                URI configID = URI.create(module.getModuleID());
                kernel.invoke(storeName, "uninstall", new Object[]{configID}, UNINSTALL_SIG);
                addModule(module);
            }
            complete("Completed");
        } catch (Exception e) {
View Full Code Here

                throw new UnsupportedOperationException("More than one deployer found");
            }

            Object[] args = {moduleArchive, deploymentPlan};
            URI configId = (URI) kernel.invoke(deployer, "deploy", args, DEPLOY_SIG);
            TargetModuleID moduleID = new TargetModuleIDImpl(targetList[0], configId.toString());
            addModule(moduleID);
            complete("Completed");
        } catch (Exception e) {
            StringWriter writer = new StringWriter();
            PrintWriter printWriter = new PrintWriter(writer);
View Full Code Here

TOP

Related Classes of org.apache.geronimo.deployment.plugin.TargetModuleIDImpl

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.